expression-blend

How to reuse icons (xaml-paths) in a large project?

一笑奈何 提交于 2019-11-29 03:43:00
问题 I am part of the development of a larger-scale Silverlight 4 project, where we will have a set of symbols that should be used across different parts of the GUI (see the example below). These icons are made from multiple paths directly in Blend, and will be used, either singly or as different visual states in usercontrols (with the same icon used in more than one context). In order to facilitate changing the design of a single icon, and having it propagate throughout the application, what is

Expression Blend: Getting error “XXX” does not exist in the namespace “XXX”, but not in VS2008

你离开我真会死。 提交于 2019-11-28 18:48:39
问题 I am trying to use Blend 3.0 to edit a project that contains some WPF controls. This project already compiles and runs fine from Visual Studio 2008. In Blend however, I'm getting mysterious errors that make no sense: For example, I have a class that derives from Control : namespace Company.WPFControls.SearchTextBox { public class SearchTextBox : Control { ... } } And I try to use it in a resource, in the same assembly, to assign a style: <ResourceDictionary xmlns="http://schemas.microsoft.com

What is the advantage of setting DataContext in code instead of XAML?

怎甘沉沦 提交于 2019-11-28 08:28:16
There seem to be two main ways to define DataContext in WPF: either in code like this: App.xaml.cs (taken from the WPF MVVM Toolkit template ): public partial class App : Application { private void OnStartup(object sender, StartupEventArgs e) { // Create the ViewModel and expose it using the View's DataContext MainView mainView = new MainView(); MainViewModel mainViewModel = new MainViewModel(); mainViewModel.LoadCustomers("c:\\testdata2\\Customers.xml"); mainView.DataContext = mainViewModel; mainView.Show(); } } or in XAML like this: Window1.xaml: <DockPanel> <StackPanel HorizontalAlignment=

Why isn't Expression Blend 4's designer working whenever we use build configurations?

帅比萌擦擦* 提交于 2019-11-28 01:58:25
问题 I'm having an odd issue with Expression Blend 4. I've been using Blend 4 in conjunction with Visual Studio 2010 for quite a while without incident (beyond the ultra-frequent crashes). Now our graphics designer wants to start using Blend to do some touch-up work. We were able to get Blend to compile the solution on his computer. Unfortunately, when we try to open any XAML file, we get errors from the designer where resources included through the merged resource dictionary and attached

Is there a way to pass a parameter (or multiple params) to the CallMethodAction behavior?

穿精又带淫゛_ 提交于 2019-11-28 00:33:20
问题 Is there a way to pass a parameter (or multiple params) to the CallMethodAction behavior? 回答1: Try InvokeCommandAction a command instead of using CallMethodAction: <i:Interaction.Triggers> <i:EventTrigger EventName="TextChanged"> <i:InvokeCommandAction Command="{Binding TextChangedCommand}" CommandParameter="{Binding ElementName=filterBox, Path=Text}"/> </i:EventTrigger> </i:Interaction.Triggers> Hope it helps 回答2: After some decompiling it turns out that CallMethodAction does support calling

WPF Applications: Visual Studio vs. Expression Blend

巧了我就是萌 提交于 2019-11-27 23:26:39
问题 I am a bit confused on how Visual Studio 2010 and Expression Blend 4 operate together. If I want to create a WPF application, should I start it in Expression Blend 4? If so, then how does Visual Studio 2010 natively open Expression Blend projects, or does it? Or should I start my application in Visual Studio 2010? If so, how do I open my solution in Expression Blend. Also, how do I modify an existing WPF form, if I need changes. If I already have events handled and code behind, how do I bring

WPF Data Triggers and Story Boards

拟墨画扇 提交于 2019-11-27 19:45:20
I'm trying to trigger a progress animation when ever the ViewModel/Presentation Model is Busy. I have a IsBusy Property, and the ViewModel is set as the DataContext of the UserControl. What is the best way to trigger a "progressAnimation" story board when the IsBusy property is true? Blend only let med add Event-Triggers on a UserControl level, and I can only create property triggers in my data templates. The "progressAnimation" is defined as a resource in the user control. I tried adding the DataTriggers as a Style on the UserControl, but when I try to start the StoryBoard I get the following

MVVM Light + Blend designer view error: Cannot find resource named 'Locator'.

我的未来我决定 提交于 2019-11-27 13:02:11
问题 The application runs fine but i could not see my design in the designer view. It says Cannot find resource named 'Locator'. Obviously, i did not change anything in the code, i just did the data binding using the data binding dialog... anyone facing the same problem? 回答1: There are two known occurrences where this can happen. If you change to Blend before you built the application, the DLLs are not available yet and this error can be seen. Building the application solves the issue. There is a

What is the advantage of setting DataContext in code instead of XAML?

人走茶凉 提交于 2019-11-27 02:15:45
问题 There seem to be two main ways to define DataContext in WPF: either in code like this: App.xaml.cs (taken from the WPF MVVM Toolkit template): public partial class App : Application { private void OnStartup(object sender, StartupEventArgs e) { // Create the ViewModel and expose it using the View's DataContext MainView mainView = new MainView(); MainViewModel mainViewModel = new MainViewModel(); mainViewModel.LoadCustomers("c:\\testdata2\\Customers.xml"); mainView.DataContext = mainViewModel;

WPF Data Triggers and Story Boards

吃可爱长大的小学妹 提交于 2019-11-26 22:50:33
问题 I'm trying to trigger a progress animation when ever the ViewModel/Presentation Model is Busy. I have a IsBusy Property, and the ViewModel is set as the DataContext of the UserControl. What is the best way to trigger a "progressAnimation" story board when the IsBusy property is true? Blend only let med add Event-Triggers on a UserControl level, and I can only create property triggers in my data templates. The "progressAnimation" is defined as a resource in the user control. I tried adding the