control-template

how to get the default style and control template of WP7 control?

穿精又带淫゛_ 提交于 2019-12-09 19:24:01
问题 they have the styles and templates for WPF and Silverlight controls published on MSDN. but not for the WP7 controls. So, how to get the default style and control template of WP7 control ? 回答1: In your SDK folder C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Design or C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Design You will find System.Windows.xaml and ThemeResources.xaml as well as folders for eah of the themes. 来源: https://stackoverflow.com/questions/6767191/how-to

TemplateBinding from a Style DataTrigger In ControlTemplate

[亡魂溺海] 提交于 2019-12-07 02:28:47
问题 In the following XAML I'm using a Rectangle with a Border as the Template for a ToggleButton. I want the BorderBrush to be a different colour to reflect the changing value of ToggleButton.IsChecked. Unfortunately my attempt here of using a TemplateBinding in the DataTrigger doesn't work. What do I need to do instead? <StackPanel Orientation="Horizontal"> <StackPanel.Resources> <ControlTemplate x:Key="ButtonAsSwatchTemplate"> <Border BorderThickness="1"> <Border.Style> <Style> <Setter Property

TemplateBinding from a Style DataTrigger In ControlTemplate

删除回忆录丶 提交于 2019-12-05 07:22:24
In the following XAML I'm using a Rectangle with a Border as the Template for a ToggleButton. I want the BorderBrush to be a different colour to reflect the changing value of ToggleButton.IsChecked. Unfortunately my attempt here of using a TemplateBinding in the DataTrigger doesn't work. What do I need to do instead? <StackPanel Orientation="Horizontal"> <StackPanel.Resources> <ControlTemplate x:Key="ButtonAsSwatchTemplate"> <Border BorderThickness="1"> <Border.Style> <Style> <Setter Property="BorderBrush" Value="Gainsboro" /> <Style.Triggers> <!-- TemplateBinding doesn't work.--> <DataTrigger

how to get the default style and control template of WP7 control?

我的未来我决定 提交于 2019-12-04 14:58:12
they have the styles and templates for WPF and Silverlight controls published on MSDN. but not for the WP7 controls. So, how to get the default style and control template of WP7 control ? In your SDK folder C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Design or C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Design You will find System.Windows.xaml and ThemeResources.xaml as well as folders for eah of the themes. 来源: https://stackoverflow.com/questions/6767191/how-to-get-the-default-style-and-control-template-of-wp7-control

Silverlight 4 : Making Closeable Tabitems

喜你入骨 提交于 2019-11-28 12:38:19
I would like to extend the tab control to have closeable tab items. I have found this WPF solution of Kent: On the WPF TabControl - can I add content next to the tab headers? I opened a copy of the existing silverlight tabcontrol in Blend. However the structure looks quite different to the WPF tabcontrol. I can't get it right into the Silverlight control template. Does anyone know a good resource for me? You can Template TabItem to have some sort of close button that you can hook up in code behind to close the currently selected tab. <Style TargetType="TabItem"> <Setter.Value> <ControlTemplate

WPF ListBox, how to hide border and change selected item background color?

早过忘川 提交于 2019-11-27 22:59:22
问题 I'd like to hide the border of ListBox, and make background of selected item the same as unselected ones. How do I do this? 回答1: To hide the border, use <ListBox BorderThickness="0"/> If you don't want to have a selection, use an ItemsControl instead of the ListBox . The following code hides the border around the ListBox and does always show a white background on the item (if its generated through the ItemsSource -property). <ListBox BorderThickness="0" HorizontalContentAlignment="Stretch">

Silverlight 4 : Making Closeable Tabitems

别等时光非礼了梦想. 提交于 2019-11-27 07:07:52
问题 I would like to extend the tab control to have closeable tab items. I have found this WPF solution of Kent: On the WPF TabControl - can I add content next to the tab headers? I opened a copy of the existing silverlight tabcontrol in Blend. However the structure looks quite different to the WPF tabcontrol. I can't get it right into the Silverlight control template. Does anyone know a good resource for me? 回答1: You can Template TabItem to have some sort of close button that you can hook up in