silverlight-toolkit

Disable tapping on group header in LongListSelector

不羁岁月 提交于 2019-12-10 11:48:41
问题 I have a simple LongListSelector from wp7 toolkit. Now I want to disable opening popup when anybody taps on the group header. How to reach that ? 回答1: Just don't specify the <GroupItemTemplate> element in your LongListSelector and this will disable the fullscreen jump list. 回答2: A LongListSelector shows fullscreen. Why would a popup ever happen? If for some reason stuff is being done behind the screens have a boolean set to true everytime the user taps on the longlistselector and only show

How to get the Owner of the ContextMenu (from Silverlight 4 toolkit)?

╄→гoц情女王★ 提交于 2019-12-10 11:45:27
问题 When I use ContextMenu from Silverlight 4 Toolkit I want to get ContextMenu instance's Owner, but it's not available since in ContextMenu class Owner is an internal property. For example, I have a Rectangle put inside a Border. When I right-click a Rectangle (and a context menu appears) I need to change the Rectangle Border's thickness to indicate that the Rectangle is the current element of the parent Grid, for example. So I try to use ContextMenu.Loaded event where I get the ContextMenu

Get Row from Index in Silverlight DataGrid

℡╲_俬逩灬. 提交于 2019-12-10 10:06:24
问题 I am trying to implement reordering rows in a Silverlight DataGrid. For this I am extending the default DataGridDragDropTarget , and I need to override and implement the following method: protected override DataGridRow ContainerFromIndex(DataGrid itemsControl, int index) { } How can I get the DataGridRow from the DataGrid and the Index? 回答1: A slight improvement on Herzmeister's answer, see comments: protected override DataGridRow ContainerFromIndex(DataGrid itemsControl, int index) { var

How to change background colors in ReadOnly textbox in silverlight 5?

╄→尐↘猪︶ㄣ 提交于 2019-12-10 09:51:48
问题 I Want To Change Color of ReadOnly Textbox It is Possible To Change Default Color to white Color <Style TargetType="TextBox"> <Setter Property="Background" Value="White"/> <Setter Property="Foreground" Value="Black"/> </Style> and textbox as <TextBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Height="18" Padding="0" IsReadOnly="True" Margin="3,0,3,0"/> Thanks In Advance 回答1: The problem is not that the Background Setter doesn't work, it is that the ReadOnly state for the

Silverlight BusyIndicator : Higher Z-Index than all ChildWindows

百般思念 提交于 2019-12-09 02:18:29
Perhaps the title is worded incorrectly. I have a "global" Busy Indicator that works great, as long as I don't try to use it when a ChildWindow is open. I access the "global" Busy Indicator by using a static method in my App.xaml.cs: BusyIndicator b = (BusyIndicator)App.Current.RootVisual; if (b != null) { b.BusyContent = busyText; b.IsBusy = true; } However, if a ChildWindow is open, the BusyIndicator is always behind it. I thought that I could set b.Content = VisualTreeHelper.GetOpenPopups().First() , but that didn't work either. Does anyone have any tips on having a BusyIndicator on top of

Disable tapping on group header in LongListSelector

◇◆丶佛笑我妖孽 提交于 2019-12-08 21:30:29
I have a simple LongListSelector from wp7 toolkit. Now I want to disable opening popup when anybody taps on the group header. How to reach that ? Just don't specify the <GroupItemTemplate> element in your LongListSelector and this will disable the fullscreen jump list. A LongListSelector shows fullscreen. Why would a popup ever happen? If for some reason stuff is being done behind the screens have a boolean set to true everytime the user taps on the longlistselector and only show the popup if that boolean is false 来源: https://stackoverflow.com/questions/9021203/disable-tapping-on-group-header

Silverlight Toolkit ContextMenu: Which control was right-clicked?

♀尐吖头ヾ 提交于 2019-12-08 14:15:39
The Silverlight Toolkit has a lovely ContextMenu, which can be shared among multiple instances of controls such as Textbox. Sharing can result from the ContextMenu being declared in a container which also hosts other controls. <StackPanel> <TextBox x:Name="box1" Text="{Binding str1}" /> <TextBox x:Name="box2" Text="{Binding str2}" /> <toolkit:ContextMenuService.ContextMenu> <toolkit:ContextMenu Name="cm"> <toolkit:MenuItem Name="cmiCut" Header="Cut" /> <toolkit:MenuItem Name="cmiCopy" Header="Copy" /> <toolkit:Separator/> <toolkit:MenuItem Name="cmiPaste" Header="Paste" /> </toolkit

Silverlight Toolkit ContextMenu: Which control was right-clicked?

限于喜欢 提交于 2019-12-08 08:12:26
问题 The Silverlight Toolkit has a lovely ContextMenu, which can be shared among multiple instances of controls such as Textbox. Sharing can result from the ContextMenu being declared in a container which also hosts other controls. <StackPanel> <TextBox x:Name="box1" Text="{Binding str1}" /> <TextBox x:Name="box2" Text="{Binding str2}" /> <toolkit:ContextMenuService.ContextMenu> <toolkit:ContextMenu Name="cm"> <toolkit:MenuItem Name="cmiCut" Header="Cut" /> <toolkit:MenuItem Name="cmiCopy" Header=

Silverlight BusyIndicator : Higher Z-Index than all ChildWindows

馋奶兔 提交于 2019-12-08 05:19:10
问题 Perhaps the title is worded incorrectly. I have a "global" Busy Indicator that works great, as long as I don't try to use it when a ChildWindow is open. I access the "global" Busy Indicator by using a static method in my App.xaml.cs: BusyIndicator b = (BusyIndicator)App.Current.RootVisual; if (b != null) { b.BusyContent = busyText; b.IsBusy = true; } However, if a ChildWindow is open, the BusyIndicator is always behind it. I thought that I could set b.Content = VisualTreeHelper.GetOpenPopups(

Hierarchical templating multiple object types in silverlight

我怕爱的太早我们不能终老 提交于 2019-12-07 19:14:52
问题 Is it possible and if so what is the best way to implement the following hierarchical structure in a silverlight (4) TreeView control? (where Item and Group are classes which can exist in the tree). Group | |-Item | |-Group | | | |-Item | | | |-Item | |-Item The structure could of course be arbitrarily more complex than this, if needed. HierarchicalDataTemplates appear to be the way to approach this, but I'm specifically having trouble understanding how I might apply the template to interpret