silverlight

NSIS Changing config file present in XAP file i.e. silverlight component build

早过忘川 提交于 2020-01-16 09:05:30
问题 I am creating one installer which needs to change config file of my one silverlight component. This component's config file is inside XAP file. Is there any way to change that config file? 回答1: Host your configuration file side-by-side with your XAP file. ../YourProject.XAP ../YourProjectSettings.XML The following code will download a file called "Settings.xml" which sits in the same directory as your XAP, and place it in Isolated Storage. You can then open/close/parse it as needed later.

Filling Grid with TextBoxes programmatically in WPF

倾然丶 夕夏残阳落幕 提交于 2020-01-16 09:00:30
问题 Let's assume that I have defined two Grid s and few TextBox es in my XAML . I want to put these TextBox es in the Grid s at runtime (I know which TextBox should be put in which Grid after starting the application). I thought it would be possible to simply add a row definition to the Grid in my C# code, however the text boxes bind to some Style . Maybe there is a simple solution (entirely in XAML - preferred)? So the question is - how to dynamically fill the grid during the runtime with the

Dynamic Control Template in Silverlight

心已入冬 提交于 2020-01-16 05:28:04
问题 I'm trying to make a button in Silverlight use a control template to change the way it looks. I need to do this dynamically in code (not xaml markup). The Button object has a Template property to which you can assign a ControlTemplate. But how do you stuff UI elements into the ControlTemplate? (In WPF, there is a VisualTree property but no such property exists in Silverlight) 回答1: I'm not sure if this helps, but just in case. To create buttons using a control template in code behind (not XAML

Difference b/w creating a RIA Services Solution and RIA Services class library

心不动则不痛 提交于 2020-01-16 04:44:53
问题 what's Difference b/w creating a RIA Services Solution (i.e. Enabling RIA Services checkbox) and RIA Services class library (i.e. using a project template) What are the functional differences amongst the two? 回答1: The library option means you can share it between projects more easily. The solution option is just simpler to get working (not much though). There is no real functional difference between them. They are just different project structures. Each RIA services library turns into a web

Removing Bindings in Silverlight

不羁的心 提交于 2020-01-16 03:21:41
问题 I am looking at this, Clear Binding in Silverlight (Remove Data Binding from SetBinding) But to clear bindings you have to specify a dependency property. Is there a way to generically find all the bindings on a DependencyObject and clear them? Thanks. 回答1: How about iterating over all the static dependency properties (using Reflection ) of that control's type and resetting bindings on them? 来源: https://stackoverflow.com/questions/4405288/removing-bindings-in-silverlight

SilverLight命名空间详解-新手入门

杀马特。学长 韩版系。学妹 提交于 2020-01-16 02:01:47
1.核心命名空间 1.xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"是silverlight的核心命名空间,包含所有了的silverlight的核心类。比如usercontrol和grid等.通常此命名空间声明时没有加前缀,因此它成为了整个文档的的默认命名空间。换句话说就是 页面所有的元素都默认的属于此命名空间,除非声明了其它的。 2.xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 表示XAML的命名空间。此命名空间的前缀为x。你可以通过把命名空间放在一个XML元素名称或属性前使用它(例如:x:Class="CheckNamespace.MainPage" 核心命名空间主要是让XAML解析器找到正确的类。比如,当遇到Grid和UserControl时,解析器发现它在 http://schemas.microsoft.com/winfx/2006/xaml/presentation 命名空间下。然后继续寻找相对应的SilverLight对应的类,直到找到匹配的类system.Windows.Usercontrol和System.Windows.Controls.Grid为止。 2.设计命名空间

How do I slide child items up or down inside a WPF wrappanel?

帅比萌擦擦* 提交于 2020-01-15 15:30:28
问题 Hi and thanks for looking! Background First, I am an absolute n00b to WPF/Silverlight/XAML. I have a wrappanel into which I add a bunch of image thumbnails at runtime. This works well. When the wrap panel is populated, it runs the thumbnails horizontally and then wraps on the next row repeatedly so that after all thumbnails are loaded, I have several out of view below the screen. In my app, the a scrollbar looks to wonky, so I would like to add an "up" and "down" button above the wrap panel.

How do I slide child items up or down inside a WPF wrappanel?

旧城冷巷雨未停 提交于 2020-01-15 15:30:21
问题 Hi and thanks for looking! Background First, I am an absolute n00b to WPF/Silverlight/XAML. I have a wrappanel into which I add a bunch of image thumbnails at runtime. This works well. When the wrap panel is populated, it runs the thumbnails horizontally and then wraps on the next row repeatedly so that after all thumbnails are loaded, I have several out of view below the screen. In my app, the a scrollbar looks to wonky, so I would like to add an "up" and "down" button above the wrap panel.

PRISM-MVVM, ItemsControl problem with View injection

▼魔方 西西 提交于 2020-01-15 14:13:57
问题 I need to display multiple instances of a basketDetailsView.xaml within a region placed in basketView.xaml, but I'm getting the following errormessage when i debug my code: "An exception occurred while creating a region with name 'basketRegion'. The exception was: System.InvalidOperationException: ItemsControl's ItemsSource property is not empty. This control is being associated with a region, but the control is already bound to something else. If you did not explicitly set the control's

PRISM-MVVM, ItemsControl problem with View injection

爱⌒轻易说出口 提交于 2020-01-15 14:10:18
问题 I need to display multiple instances of a basketDetailsView.xaml within a region placed in basketView.xaml, but I'm getting the following errormessage when i debug my code: "An exception occurred while creating a region with name 'basketRegion'. The exception was: System.InvalidOperationException: ItemsControl's ItemsSource property is not empty. This control is being associated with a region, but the control is already bound to something else. If you did not explicitly set the control's