silverlight-toolkit

ToggleSwitch color/styling

假装没事ソ 提交于 2019-12-11 11:16:27
问题 I got an issue that my ToggleSwitch is white like this picture below shows: I want to style the white part to be black. How do I do that? I've changed the default style but no option seems to change it? Here is my style for it: <Style x:Key="ToggleSwitchStyle" TargetType="toolkit:ToggleSwitch"> <Setter Property="Background" Value="{StaticResource PhoneBackgroundBrush}"/> <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyLight}"/> <Setter Property="FontSize" Value="

Microsoft.Phone.Controls.Toolkit ListPicker throws XamlParseException

北慕城南 提交于 2019-12-11 09:07:03
问题 After being advised that the native ComboBox was not the way to go I was told to look at the Silverlight Toolkit ListPicker . So I did and have got a problem. I opened a new project and pulled a new ListPicker onto the MainPage. The ListPicker looks like: <toolkit:ListPicker x:Name="Result"> <toolkit:ListPickerItem Content="Win" /> <toolkit:ListPickerItem Content="Place" /> <toolkit:ListPickerItem Content="Lose" /> </toolkit:ListPicker> When trying to run this I get an XamlParseException with

WrapPanel for windows phone 7

笑着哭i 提交于 2019-12-11 09:05:36
问题 I'm trying to add a WrapPanel to my app, up to now I found that WrapPanel is only available through SilverLight Toolkit here http://silverlight.codeplex.com/releases I've downloaded it and installed it, but now what do I do? I assumed that a reference needed to be added but I can't think of what to add. 回答1: Add a reference to Microsoft.Phone.Controls.Toolkit.dll. The WrapPanel control is in the Microsoft.Phone.Controls namespace. In your page/user control, add the following XML namespace

How keep drop down opened in silverlights ComboBox?

一个人想着一个人 提交于 2019-12-11 08:35:04
问题 I use ComboBox control as popup. Item for my ComboBox is Grid. There is TreeView control and two Buttons in grid. Items of TreeView are CheckBoxes. When I click on Buttons or CheckBoxes drop down keeps opened, but when I click on other part of grid drop down i closed. Is there any way to keep it opened until I click outside of ComboBox? I have looked a lot in Google, but haven't found anything. <UserControl.Resources> <common:HierarchicalDataTemplate x:Key="HierarchicalDataTemplate

Drag/drop from ListBoxDragDropTarget to PanelDragDropTarget

寵の児 提交于 2019-12-11 06:56:12
问题 Using the Silverlight 4 toolkit, is it possible to drag and drop from a ListBox to a Canvas (and get an event on the drop into the Canvas)? I was able to write code to drag/drop from a wrap panel inside a PanelDragDropTarget to a canvas but the event handler did not trigger when the drop occurred. When I tried to drag/drop from a ListBox inside a ListBoxDragDrop to the Canvas inside the PanelDragDropTarget, the drop did not occur (and the event handler didn't trigger). While dragging over the

virtualizing treeview in silverlight

梦想与她 提交于 2019-12-11 06:25:11
问题 I am using silverlight toolkit treeview to show set of data. It has 1000 elements and some of the child elements have as much as 500 child elements as well. It takes almost a minute to load the data and show it in treeview. Does the tree view have virtualization? If it does, could some one point me to a sample or code snippet please? Following is the XAML <controls:TreeView Grid.Column="0" VerticalAlignment="Stretch" ItemsSource="{Binding People}" > <controls:TreeView.ItemTemplate> <common

MouseLeftButtonDown is not fired on TreeViewItem

烈酒焚心 提交于 2019-12-11 02:41:59
问题 <Grid x:Name="LayoutRoot" Background="White"> <sdk:TreeView MouseLeftButtonDown="TreeView_MouseLeftButtonDown"> <sdk:TreeViewItem Header="this is first item"/> </sdk:TreeView> </Grid> call is not coming to TreeView_MouseLeftButtonDown event handler.. any ideas or work around? 回答1: Have you ever noticed that the MouseLeftButtonDown and MouseLeftButtonUp events are not fired when a Silverlight button is clicked? The reason for this is that the button handles these two events itself by

How to localize ToggleSwitch on Windows Phone 7 (localizing Silverlight Toolkit)?

一世执手 提交于 2019-12-10 22:49:18
问题 Silverlight Toolkit has a resource file named Resources.resx, which contains "On" and "Off" string states for the switch. But when I have added a corresponding localized resource, Resources.ru-RU.resx, it wasn't picked up by the localization (though the similar approach works for my own resources). One way to do it is to create my own binding for the ToggleSwitch Content, but I was hoping for a non-coding solution. Possible? 回答1: You need to name your resource file ControlResources.ru-RU.resx

How to set the selecteditem

断了今生、忘了曾经 提交于 2019-12-10 19:59:52
问题 I am trying to set the value/selecteditem of a listpicker control - from the silverlight toolkit for windows phone 7 (when the user wants to edit an entry in xml, it pulls the data out of IO and sets it in the text boxes/listpickers). I am currently trying to use: ListPickerSub.SelectedItem = sub; (sub is a string) But it is throwing a System.InvalidOperationException Additional information: SelectedItem must always be set to a valid value. 回答1: SelectedItem is expecting a ListPickerItem

WrapPanel in Silverlight 4 toolkit

家住魔仙堡 提交于 2019-12-10 15:47:22
问题 This seems like such a silly question, but I can't for the life of me figure out how to use the WrapPanel in the most recent (April 2010) Silverlight toolkit. Apparently they thought it was a good idea to change the namespaces/assemblies around, and not put anything on their codeplex site about this. And their samples for these controls do not show the entire code (like where they register these namespaces.) Any help would be appreciated. 回答1: What have you tried? From what I can tell from