silverlight-4.0

How to properly organize XAML resources in Silverlight?

我的梦境 提交于 2019-12-07 19:32:51
问题 I'm having some issues with resource files in my modular application. I have Infrastructure.DLL and some custom controls inside this DLL. Those controls using templates from themes/generic.xaml Issue that I have - Blend doesn't recognize those resources. Visual studio does. Ideally I'd like to have styles for my cusom controls inside generic.xaml and styles for other controls somewhere else in common library that I can reference from my modules. I also need Expression Blend and VS to work

Silverlight 4: Free Split Button

耗尽温柔 提交于 2019-12-07 19:17:58
问题 I'm looking for free splitbutton control for silverlight. I've seen this blog however I cannot download it. Its blocked in my firewall. Do you know any free splitbutton for silverlight? Thank you 回答1: It is available for free in the Silverlight Toolkit. Download the latest Silverlight Toolkit from CodePlex. http://silverlight.codeplex.com/ Download the SplitButton Samples and Project. You may use the SplitButton project to compile your own version of the SplitButton.dll or use the Sample

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

Binding to a collection of DependencyObjects in Silverlight 4

橙三吉。 提交于 2019-12-07 17:14:05
问题 As of Silverlight 4 it is possible to data bind against a DependencyObject (instead of a Framework element in previous versions). So far so good, but how do I bind agains a collection of DependencyObjects. The DataContext is not passed from the ObservableCollection to the collection elements, so that the DependencyProperties of the DependencyObjects are never called (neither the changed events). Neither the DependencyObject offers SetBinding or DataContext to initialize the binding manually.

Silverlight 4 and Implicit styling

不想你离开。 提交于 2019-12-07 17:00:32
问题 In Silverlight 4 it's possible to use implicit styling - and that is amazing! But what if I want to apply a style to all of my Buttons, CheckBoxes and RadioButtons (all inheriting from ButtonBase)? I can't set TargetType on the Style to ButtonBase - that doesn't work. Do I need to create a style to each of the 3 control types? 回答1: http://www.silverlightshow.net/items/Implicit-Styles-in-Silverlight-4.aspx Try this 回答2: xamlgeek, The following implicit styles work well for me. I first create

Silverlight: Determine parent TreeViewItem?

若如初见. 提交于 2019-12-07 15:52:05
问题 I have a TreeViewItem . I'd like to get parent node of this item if any. However TreeViewItem.ParentTreeViewItem property is internal, and thus not accessible. There is no reason to hide this property from developers, however, someone very smart decided that way. How do I proceed? Is there any workarounds (reflection on private members is not working in SL)? 回答1: Found an ugly, but working way: static TreeViewItem GetParentItem(TreeViewItem item) { for (var i = VisualTreeHelper.GetParent(item

How to bind maximum and minimum zoom levels in Bing Maps Silverlight

安稳与你 提交于 2019-12-07 15:42:44
问题 I would like to implement a custom zoom slider for a Bing Maps control in my silverlight application. I can set up the mechanics of it in a pretty straightforward way: <Slider ... Value="{Binding ZoomLevel, Mode=TwoWay, ElementName=MyMap}"/> However, I can't find a way to bind the Maximum and Minimum properties of the Slider to the maximum and minimum available zoomlevel for the map. I am using the default views (Road, Aerial) and no custom tilesets or anything fancy. I've tried something

How do you bind to a command property with caliburn.micro?

感情迁移 提交于 2019-12-07 13:06:24
问题 I have a behavior that exposes several command properties. Typically I use MVVM Light and would just use a routed command in my view model and bind to those. However, this project is using Caliburn.Micro so I'm trying to do it the Caliburn.Micro way. Is there some syntax I can use on the Message.Attach to do this (is there any good documentation on the parser for Message.Attach)? Do I have to modify the behavior to expose events to make this work with Caliburn.Micro? 回答1: Caliburn.Micro has

Is there a workaround for this tabcontrol/tabitem bug

独自空忆成欢 提交于 2019-12-07 13:05:01
问题 Unless I'm mistaken (which I hope I am) there is a bug with the TabControl related to the visibility of TabItems . Here's XAML that reproduces the bug. <UserControl x:Class="TabControl_bug.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:sdk="http://schemas.microsoft.com/winfx

Silverlight 4 launch a trusted application into the browser?

天涯浪子 提交于 2019-12-07 11:33:30
问题 I just lost 5 hours looking for a answer which i haven't been able to find :p First, I'd like to force a trusted application (i need to access the file system) to display into the browser. Based on what i found on google a trusted application must be installed and launched as a desktop application (also called out-of-browser application). So, i want to have an installed application on the client side but meanwhile, the user must also be able to start this same application into a browser