วันศุกร์ที่ 22 มิถุนายน พ.ศ. 2555

Silverlight Set IE Full Screen

public partial class Page : UserControl
    {
        public Page()
        {
            InitializeComponent();
        }
 
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ToggleFullScreen();
        }
 
        private void ToggleFullScreen()
        {
            Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;
        }
    }

วันอาทิตย์ที่ 17 มิถุนายน พ.ศ. 2555

How to sort combind field in datagrid.

I use the code below to combine

<sdk:DataGridTemplateColumn Header="MergeColumn" Width="90">
<sdk:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="3,4,0,0">
<TextBlock Text="{Binding FieldA}" />
<TextBlock Text="{Binding FieldB}" />
</StackPanel>
</DataTemplate>
</sdk:DataGridTemplateColumn.CellTemplate>
</sdk:DataGridTemplateColumn>

วันพฤหัสบดีที่ 7 มิถุนายน พ.ศ. 2555

Xap packaging failed. Object reference not set to an instance of an object

I'm getting this error message on my PC when I try to build  Silverlight App:
Xap packaging failed. Object reference not set to an instance of an object 
I'm using Dropbox. On my laptop, It works perfectly fine and I can debug etc...

Please tried many things such as:
  • Delete obj/Debug Folder
  • Check for files which are missing on the Solution Explorer