SL beta2 Known Issue

rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1.LEO%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"> rel="Edit-Time-Data" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1.LEO%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_editdata.mso"> rel="themeData" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1.LEO%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"> rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1.LEO%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml">

Silverlight 2 (beta1) Known Issues and workarounds (if any)

1 Apr, 2008  Silverlight

The following is the list of known issues for Silverlight 2 beta 1.

But this is not something new. If you keep on reading Silverlight Forum, you may already aware of those issues. but I wrote this post for those who are not aware of those issues. If you are facing some strange issues, please come and check before spending too much time for finding why something is not working as expected. I hope that you will find it useful. The most of issues are confirmed by Yi-Lun (MSFS) in our forum. (Thanks! Yi-Lun)

If you want to share some SL2 known issues that you like to share with everybody, please let me know.

List of issues

  1. Binding Datagrid with Anonymous type will crash the browser
  2. Pressing “Delete” button after doing a few steps will crash the browser.(I will mention those steps later in this post.)
  3. Controls inside the canvas don’t appear until mouse hovers over them.
  4. TextBox - Cursor will disappear when you add the textbox after removing
  5. DispatcherTimer doesn’t allow event subscription after timer is started
  6. The exception occurs if you hide the button in Click event
  7. Textbox doesn’t work well with non-English keyboard
  8. ScrollBar HorizontalRootElement shows as artifact behind VerticalRootElement
  9. Border.Child - System.ArgumentException and System.AccessViolationException
  10. HorizontalAlignment not respected in Silverlight as in WPF
  11. TextBlock MouseEvent doesn’t work properly when text alignment is applied
  12. The storePath of Isolated Storage in Application_Startup event and the storepath in Application_Exit event are different.

Issue #1: Binding Datagrid with Anonymous type will crash the browser.

Source: http://silverlight.net/forums/p/11147/36232.aspx

Problem ~

Binding Datagrid with Anonymous type will crash the browser

Steps to reproduce ~

  • Create new SL 2 project.
  • Add DataGrid in Page.xaml

view plaincopy to clipboardprint?

    1. <my:DataGrid x:Name="myDataGrid" Height="200" Width="700" Margin="0,5,0,10"  
    2. AutoGenerateColumns="True" VerticalAlignment="Top">  

 

<my:DataGrid x:Name="myDataGrid" Height="200" Width="700" Margin="0,5,0,10"

AutoGenerateColumns="True" VerticalAlignment="Top">

  • Bind this datagrid with anonymous type.

view plaincopy to clipboardprint?

    1. string str = string.Empty;str = @"<?xml version=""1.0"" encoding=""utf-8"" ?>";  
    2. str = "<Products>";  
    3. str += "<Product>";  
    4. str += "<ID>";  
    5. str += "1";  
    6. str += "</ID>";  
    7. str += "<Name>";  
    8. str += "dd";  
    9. str += "</Name>";  
    10. str += "</Product>";  
    11. str += "<Product>";  
    12. str += "<ID>";  
    13. str += "2";  
    14. str += "</ID>";  
    15. str += "<Name>";  
    16. str += "ee";  
    17. str += "</Name>";  
    18. str += "</Product>";  
    19. str += "</Products>";XDocument xmlSource = XDocument.Parse(str);  
    20. var products = from p in xmlSource.Descendants("Product")  
    21. select new  
    22. {  
    23. ID = Convert.ToInt32(p.Element("ID").Value),  
    24. Name = (string)p.Element("Name").Value  
    25. };  
    26.   
    27. myDataGrid.ItemsSource = products;  

 

string str = string.Empty;str = @"<?xml version=""1.0"" encoding=""utf-8"" ?>";

str = "<Products>";

str += "<Product>";

str += "<ID>";

str += "1";

str += "</ID>";

str += "<Name>";

str += "dd";

str += "</Name>";

str += "</Product>";

str += "<Product>";

str += "<ID>";

str += "2";

str += "</ID>";

str += "<Name>";

str += "ee";

str += "</Name>";

str += "</Product>";

str += "</Products>";XDocument xmlSource = XDocument.Parse(str);

var products = from p in xmlSource.Descendants("Product")

select new

{

ID = Convert.ToInt32(p.Element("ID").Value),

Name = (string)p.Element("Name").Value

};

 

myDataGrid.ItemsSource = products;

  • Result: Your browser will be hanged or crashed.

Workarounds ~

  • Create the class explicitly
  • Use the Generic List<yourClass> to bind with datagrid

Yi-Lun from Microsoft explained about this issue as below.

Hello, actually the problem is: Anonymous Types are internal. Currently data binding doesn’t support binding to non-public classes. Try to use a ListBox to bind to an internal class, you’ll find a similar problem.

The root cause seems to be: Data binding uses reflection, and reflection needs high security permissions. Silverlight runs in a sand box, where such security permissions are not granted.

However, I found that it’s working fine with Listbox. So, we are still discussing about this issue. I will update this post once we got the final conclusion.

Credit: Thanks to Yi-lun for verifying this issue.

Issue #2: Binding Datagrid with Anonymous type will crash the browser.

Source : http://silverlight.net/forums/t/13077.aspx

Problem ~

There are two sub-issues in this issue.

  1. Pressing “END” button before typing anything in TextBox will disable firing TextChanged event.
  2. After pressing “END” button, type something in textbox. then, Select those text that you type in this textbox and press “DELETE” button. Then, your browser will be crashed.

Steps to reproduce ~

  • Create new Silverlight 2 project
  • Put the following code in Page.xaml

view plaincopy to clipboardprint?

    1. <TextBox x:Name="Txt"  TextChanged="Txt_TextChanged" />  

 

<TextBox x:Name="Txt"  TextChanged="Txt_TextChanged" />

  • Put the following code in Page.xaml.cs[sourecode langauge="csharp"]
    private void Txt_TextChanged(object sender, TextChangedEventArgs e) {
    Console.WriteLine(”");
    }
    [/sourcecode]
  • Set the breakpoint in this event
  • Run the application
  • Press “End” button before typing anything
  • Type something (You will notice that TextChange event is not invoked.)
  • Select those text that you typed by pressing Shit + “HOME” or select with your cursor
  • Press “Delete” key (Your browser will be crashed)

Wordarounds

None:

Credit: Thanks to pavelsua for reporting this issue. He reported the issue 2.1. When I tried to verify his issue, I found another one (2.2).

Issue #3. Controls inside the canvas don’t appear until mouse hovers over them.

Source : http://silverlight.net/forums/t/10906.aspx

Symptom: A canvas has visibility changed from Visibilty.Collapsed to Visibilty.Visible but controls inside the canvas don’t appear until mouse hovers over them.

Steps to reproduce:

1. Create a Silverlight 2 app
2. Change the Page XAML to look like this (either manually or in Blend)

view plaincopy to clipboardprint?

  1. <UserControl x:Class="SilverlightApplication3.Page"  
  2. xmlns="http://schemas.microsoft.com/client/2007"  
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
  4. Width="400" Height="300">  
  5. <Canvas x:Name="LayoutRoot" Background="White">  
  6. <Button Height="20" Width="120" Canvas.Left="0" Canvas.Top="0" Content="Button" x:Name="btnTest"/>  
  7. <Canvas Height="68" Width="120" Canvas.Top="0" Visibility="Collapsed" x:Name="cnvTest">  
  8. <Button Height="20" Width="50" Content="Button" Canvas.Top="48"/>  
  9. </Canvas>  
  10. </Canvas>  
  11. </UserControl>  

 

<UserControl x:Class="SilverlightApplication3.Page"

xmlns="http://schemas.microsoft.com/client/2007"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Width="400" Height="300">

<Canvas x:Name="LayoutRoot" Background="White">

<Button Height="20" Width="120" Canvas.Left="0" Canvas.Top="0" Content="Button" x:Name="btnTest"/>

<Canvas Height="68" Width="120" Canvas.Top="0" Visibility="Collapsed" x:Name="cnvTest">

<Button Height="20" Width="50" Content="Button" Canvas.Top="48"/>

</Canvas>

</Canvas>

</UserControl>

3. Change the Visibility of cnvTest on clicking the button

view plaincopy to clipboardprint?

  1. public Page(){  
  2. InitializeComponent();  
  3. btnTest.Click += new RoutedEventHandler(btnTest_Click);  
  4. }  
  5. void btnTest_Click(object sender, RoutedEventArgs e){  
  6. cnvTest.Visibility = Visibility.Visible;  
  7. }  

 

public Page(){

InitializeComponent();

btnTest.Click += new RoutedEventHandler(btnTest_Click);

}

void btnTest_Click(object sender, RoutedEventArgs e){

cnvTest.Visibility = Visibility.Visible;

}

Expected: the button in the canvas to be shown as soon as the canvas is made visible.

Workarounds ~

  • Set the initial visibility of the canvas to hide to Visible - set the visibility to Collapsed in the first SizeChanged event
  • Explicitly set the Visibility of the control in the canvas to Visible (even though it already is visible)
  • Use Grid or StackPanel as the container (these both work)

Credits: Thanks to AdamJTP for reporting this issue and sharing the workaround.

————-

Issue #4. Cursor will disappear when you add the textbox after removing

Source : http://silverlight.net/forums/p/11142/36252.aspx

Symptom: The cursor of textbox won’t show when adding the textbox that is removed earlier at runtime.

Steps to reproduce ~

1. The code is written in Page.xaml. There are one button for adding new textbox, another button for removing the textbox and one canvas where the textbox suppose to be added or removed.

view plaincopy to clipboardprint?

  1. <UserControl x:Class="SL2KnownIssue.Page"  
  2. xmlns="http://schemas.microsoft.com/client/2007"  
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
  4. Width="400" Height="300">  
  5. <Grid x:Name="LayoutRoot" Background="White">  
  6. <StackPanel>  
  7. <Button x:Name="add" Content="Add"></Button>  
  8. <Button x:Name="remove" Content="Remove"></Button>  
  9. <Canvas x:Name="placeHolder" Background="Red" Width="100"   Height="100">  
  10.   
  11. </Canvas>  
  12. </StackPanel>  
  13. </Grid>  
  14. </UserControl>  

 

<UserControl x:Class="SL2KnownIssue.Page"

xmlns="http://schemas.microsoft.com/client/2007"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Width="400" Height="300">

<Grid x:Name="LayoutRoot" Background="White">

<StackPanel>

<Button x:Name="add" Content="Add"></Button>

<Button x:Name="remove" Content="Remove"></Button>

<Canvas x:Name="placeHolder" Background="Red" Width="100"   Height="100">

 

</Canvas>

</StackPanel>

</Grid>

</UserControl>

2. The code is written in Page.xaml.cs

view plaincopy to clipboardprint?

  1. namespace SL2KnownIssue {  
  2. public partial class Page : UserControl {  
  3. TextBox txt = new TextBox();  
  4. public Page() {  
  5. InitializeComponent();  
  6. add.Click += new RoutedEventHandler(add_Click);  
  7. remove.Click += new RoutedEventHandler(remove_Click);  
  8. }  
  9.   
  10. void remove_Click(object sender, RoutedEventArgs e) {  
  11. placeHolder.Children.Remove(txt);  
  12. }  
  13.   
  14. void add_Click(object sender, RoutedEventArgs e) {  
  15. placeHolder.Children.Add(txt);  
  16. }  
  17. }  
  18. }  

 

namespace SL2KnownIssue {

public partial class Page : UserControl {

TextBox txt = new TextBox();

public Page() {

InitializeComponent();

add.Click += new RoutedEventHandler(add_Click);

remove.Click += new RoutedEventHandler(remove_Click);

}

 

void remove_Click(object sender, RoutedEventArgs e) {

placeHolder.Children.Remove(txt);

}

 

void add_Click(object sender, RoutedEventArgs e) {

placeHolder.Children.Add(txt);

}

}

}

3. Run the application

4. Click “Add” button to add the textbox to the screen on the fly.

5. Try to type something in that textbox that you added. (Observe: It will be working fine as you expected.)

6. Click “Remove” button to remove the textbox and click “Add” button again.

7. then, type something in this textbox. (Observe: At this time, you are still able to type it but you won’t see the cursor anymore. )

Workarounds ~

Initially, I was thinking that the workaround would be “hiding/showing” instead of “removing and adding”. But it won’t work since we already have issue #1. So, I think there is no workaround for that. Be careful when you are trying to remove or add the element.

Credits: Thanks to sgzwkrm for reporting this issue and Yi-Lun for confirming this issue.

Issue #5. DispatcherTimer doesn’t allow event subscription after timer is started

Source: http://silverlight.net/forums/p/12652/41581.aspx

Symptom: DispatcherTimer doesn’t allow any event subscription after timer is started

Steps to reproduce

1. Attach the Tick event to Timer after calling Start() method

view plaincopy to clipboardprint?

  1. _timer = new DispatcherTimer();  
  2. _timer.Interval = TimeSpan.FromSeconds(0.5);  
  3. _timer.Start();  
  4. _timer.Tick += new EventHandler(_timer_Tick);  

 

_timer = new DispatcherTimer();

_timer.Interval = TimeSpan.FromSeconds(0.5);

_timer.Start();

_timer.Tick += new EventHandler(_timer_Tick);

Obseve: _timer_Tick will never be called.

Workaround ~

Obviously, you have to attach the event before calling Start() method.

Credits: Thanks to Florian Kruesch for reporting this issue and Allen Chen for confirming this issue.

Issue #6. The exception occurs if you hide the button in Click event

Source: http://silverlight.net/forums/p/12519/41100.aspx

Description:

Steps to reproduce ~

1. Add one button in XAML

view plaincopy to clipboardprint?

  1. <UserControl x:Class="SL2KnownIssue.Page"  
  2. xmlns="http://schemas.microsoft.com/client/2007"  
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
  4. Width="400" Height="300">  
  5. <Grid x:Name="LayoutRoot" Background="White">  
  6. <Button x:Name="add" Content="Add"></Button>  
  7. </Grid>  
  8. </UserControl>  
  9. <usercontrol x:class="SL2KnownIssue.Page"></usercontrol>  

 

<UserControl x:Class="SL2KnownIssue.Page"

xmlns="http://schemas.microsoft.com/client/2007"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Width="400" Height="300">

<Grid x:Name="LayoutRoot" Background="White">

<Button x:Name="add" Content="Add"></Button>

</Grid>

</UserControl>

<usercontrol x:class="SL2KnownIssue.Page"></usercontrol>

2. Attach the Click event in that button and hide it in that event

view plaincopy to clipboardprint?

  1. public Page() {  
  2. InitializeComponent();  
  3. add.Click += new RoutedEventHandler(add_Click);  
  4. remove.Click += new RoutedEventHandler(remove_Click);  
  5. }  
  6.   
  7. void add_Click(object sender, RoutedEventArgs e) {  
  8. add.Visibility = Visibility.Collapsed;  
  9. }  
  10. }  

 

public Page() {

InitializeComponent();

add.Click += new RoutedEventHandler(add_Click);

remove.Click += new RoutedEventHandler(remove_Click);

}

 

void add_Click(object sender, RoutedEventArgs e) {

add.Visibility = Visibility.Collapsed;

}

}

3. Run the application and click the button. (Ob: You will get the following error.)

Error Message:

“Error HRESULT E_FAIL has been returned from a call to a COM component”

stack trace :
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
at System.Windows.DependencyObject.MethodEx(String methodName, CValue[] cvData)
at System.Windows.UIElement.ReleaseMouseCapture()
at System.Windows.Controls.Primitives.ButtonBase.ReleaseMouseCaptureInternal()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

Workaround ~

  • Disable the button instead of hiding. OR
  • Set 0 to the width and height of button

Yi-Lun from Silverlight explained about this issue as below ~

Hello, this is a known issue. In MouseLeftButtonUp event handler of Button, it’ll first fire Click event (thus call your own handler), and then release mouse capture. But since you’ve hidden you Button, the ReleaseMouseCaptureInternal method will throw an Exception. I think what you want is to disable the Button to prevent the user upload the file again. So can you set IsEnabled to false instead? If you really want to hide the Button, you can set its size to 0.

Credits: Thanks to hotdave2 for reporting this issue and Thanks to Yi-Lun for providing good explanation and workarounds for this issue.

Issue #7. Textbox doesn’t work well with non-English keyboard

Source : http://silverlight.net/forums/t/10705.aspx

Problem ~

Some reported that they are not able to type accented characters, like ‘é’, Alt Gr and Ctrl+’, <letter> in textbox if they are using non-English keyboard such as Spanish, German and etc.

Workarounds ~

None

Credit: Thanks to everyone who are participating in this post.

Issue #8. ScrollBar HorizontalRootElement shows as artifact behind VerticalRootElement

Source : http://silverlight.net/forums/p/12939/42610.aspx and http://silverlight.net/forums/p/10698/34561.aspx

Problem : An artifact of the HorizontalRootElement (from the HorizontalThumbTemplate) is clearly visible.

Steps to reproduce ~

  • Populate a ListBox control with enough content so that both vertical and horizontal scroll bars appear.
  • Copy the default ListBox, ScrollBar, and related templates to App.xaml and wire them up as appropriate
  • Comment out the Track Layer in the VerticalRootElement so that you can see behind the scroll bar
  • An artifact of the HorizontalRootElement (from the HorizontalThumbTemplate) is clearly visible (narrow the vertical bar if you have trouble seeing it)

Wordarounds

view plaincopy to clipboardprint?

    1. ElementVerticalTemplate = GetTemplateChild(ElementVerticalTemplateName) as FrameworkElement;  

ElementVerticalTemplate = GetTemplateChild(ElementVerticalTemplateName) as FrameworkElement;

Credits: Thanks to jseaver and Attila for reporting this issue and thanks to Attila and Yi-Lun for showing the workarounds.

Issue #9. Border.Child - System.ArgumentException and System.AccessViolationException

Source: http://silverlight.net/forums/p/11401/36428.aspx

Problem ~

Using SL2B1 with C# (and IE7), the Border control will throw an exception if the Child property is set to the same object twice.

Example:

UserControl A;
UserControl B;

myBorder.Child = A; //OK
myBorder.Child = B; //OK
myBorder.Child = B; //Exception

An exception of type ‘System.ArgumentException’ occurred in System.Windows.dll but was not handled in user code
Additional information: Value does not fall within the expected range.

Also along these lines, setting Child to null produces another exception,

myBorder.Child = null;

An exception of type ‘System.AccessViolationException’ occurred in System.Windows.dll but was not handled in user code
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Wordarounds

None

Credit: Thanks to UncleRedz for reporting this issue and Pranav Goel for confirming this issue.

Issue #10: HorizontalAlignment not respected in Silverlight as in WPF

Source: http://silverlight.net/forums/p/12636/41513.aspx

Problems ~

Note: The following is reported by MichaelGG from Silverlight forum.

In WPF setting HorizontalAlignment on a control will let it resize itself if it’s inside a stretched element. For example:

<Window x:Class=”WpfApplication1.Window1″
xmlns=”
http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=”
http://schemas.microsoft.com/winfx/2006/xaml
Title=”Window1″ Height=”Auto” Width=”Auto”>
<Grid>
<StackPanel>
<Button Content=”asd” HorizontalAlignment=”Center” />
</StackPanel>
</Grid>
</Window>

This will show a button not much larger than it’s content, centered in the Window. However, doing the same in Silverlight fails:

<UserControl x:Class=”SilverlightApplication1.Page”
xmlns=”
http://schemas.microsoft.com/client/2007
xmlns:x=”
http://schemas.microsoft.com/winfx/2006/xaml
Width=”Auto” Height=”Auto”>
<Grid>
<StackPanel>
<Button Content=”asd” HorizontalAlignment=”Center” />
</StackPanel>
</Grid>
</UserControl>

The button is stretched across the entire window.

My WPF-layout-powers are not that strong, so it’s quite possible that I’m missing something here. But it does appear as if SL isn’t behaving how it should.

Workaround ~

Note: The following is replied from Yi-Lun.

Hello, this is a known problem which is caused by Button’s default template. As you’ve probably noticed, there’s a curve in a Button.

view plaincopy to clipboardprint?

  1. <Path x:Name="CurvedBevel" Stretch="Fill" Margin="3,0,3,0" Data="F1 M 0,0.02 V 0.15 C 0.15,0.22 0.30,0.25 0.50,0.26 C 0.70,0.26 0.85,0.22 1,0.15 V 0.02 L 0.97,0 H 0.02 L 0,0.02 Z">  

 

<Path x:Name="CurvedBevel" Stretch="Fill" Margin="3,0,3,0" Data="F1 M 0,0.02 V 0.15 C 0.15,0.22 0.30,0.25 0.50,0.26 C 0.70,0.26 0.85,0.22 1,0.15 V 0.02 L 0.97,0 H 0.02 L 0,0.02 Z">

Nice as it is, this will cause layout problems. Add this Path to a WPF’s Button’s template, and you’ll get the same result. So you have to override the Button’s template, and remove this Path or so…

Issue #11: TextBlock MouseEvent doesn’t work properly when text alignment is applied

Source: http://silverlight.net/forums/t/12672.aspx

Problem ~

All Mouse event of TextBlock is not fired when TextAlignment =”Center” .

Steps to reproduces ~

  • Put the following code in XAML (e.g. Page.xaml)

view plaincopy to clipboardprint?

    1. <TextBlock x:Name="textBlock"  
    2. Width="400"  
    3. VerticalAlignment="Center"  
    4. TextAlignment="Center"  
    5. Text="Center aligned text"  
    6. MouseMove="TextBlock_MouseMove"  
    7. MouseEnter="TextBlock_MouseEnter"  
    8. MouseLeave="TextBlock_MouseLeave"></TextBlock>  

 

<TextBlock x:Name="textBlock"

Width="400"

VerticalAlignment="Center"

TextAlignment="Center"

Text="Center aligned text"

MouseMove="TextBlock_MouseMove"

MouseEnter="TextBlock_MouseEnter"

MouseLeave="TextBlock_MouseLeave"></TextBlock>

  • Put the following code in C# (e.g. Page.xaml.cs)

view plaincopy to clipboardprint?

    1. private void TextBlock_MouseMove(object sender, MouseEventArgs e)  
    2. {  
    3. this.textBlock.FontStyle = FontStyles.Italic;}private void TextBlock_MouseEnter(object sender, MouseEventArgs e)  
    4. {  
    5. this.textBlock.Foreground = highlight;  
    6. }private void TextBlock_MouseLeave(object sender, MouseEventArgs e)  
    7. {  
    8. this.textBlock.Foreground = normal;  
    9. this.textBlock.FontStyle = FontStyles.Normal;  
    10. }  

 

private void TextBlock_MouseMove(object sender, MouseEventArgs e)

{

this.textBlock.FontStyle = FontStyles.Italic;}private void TextBlock_MouseEnter(object sender, MouseEventArgs e)

{

this.textBlock.Foreground = highlight;

}private void TextBlock_MouseLeave(object sender, MouseEventArgs e)

{

this.textBlock.Foreground = normal;

this.textBlock.FontStyle = FontStyles.Normal;

}

  • Set the breakpoint on those events.
  • Run the application.
  • Move your cursor over the textblock (Ob: No event will be raised.)
  • Remove “TextAlignment=”Center”"
  • Run the application and move the cursor around the textbox (You will get all events that you want so I think the problem is “TextAlignment=”Center”")

Credit: Thanks to Jongho for reporting this issue.

Issue #12: The storePath of Isolated Storage in Application_Startup event and the storepath in Application_Exit event are different.

Source: http://silverlight.net/forums/p/12247/42471.aspx

Problem ~

The storePath of Isolated Storage in Application_Startup event and the storepath in Application_Exit event are different.

Steps to reproduce ~

  • Download the sample project from this link.(Thanks to Jong Ho for making this sample for me.)
  • Set the breakpoint at Application_Startup event and Application_Exit event
  • Run the application.
  • Check “storageFile.m_StorePath” in debug mode. Please copy this path
  • Close the browser to stop running the application.
  • Check “storageFile.m_StorePath” (You will notice that the paths are different on startup event and exit event.)

Workarounds

  • A workaround is to cache the isolated storage path in the Startup event, or handle the html window.onunload event instead of Silverlight’s Exit event.

Credit: Thanks to bpatters for reporting this issue, Jong Ho for making the demo and Yi-lun for verifying this issue and providing the workaround.

That’s all for now. I have 3 or 5 issues in my list. I will update those issue tomorrow or this weekend. If you have any known issue of Silverlight 2 beta1, please let me know.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值