app.xaml

Broken Silverlight Design-Surface in VS2008

In VisualStudio 2008, the design surface is just empty since I added this style to App.xaml: <Style x:Key="RightAlignedCell" TargetType="data:DataGridCell"> <Style.Setters> <Setter Property="HorizontalContentAlignment" Value="Right" /> </Style.Setters> </Style> and adding this required namespace at ...

Using ObjectDataProvider

I cannot believe that nobody has gotten across this or perhaps I'm just missing something. I've got a custom DataSourceController which handles retrieving data and providing it to the rest of the application controls. Naturally, it uses sql connection which I also initialize. My App code: private ISQLConnection conn; public ISQLConnec...

WPF: Changing Resources (colors) from the App.xaml during runtime

I am trying to make my application more customizable by allowing users to pick a color from a Color Picker dialog, and then changing the style of the application in real time (with DynamicResource) How do I go about in changing specific resources that reside in the app.xaml ? I have tried something like this but no luck (just a test)...

how can we control the storyboard of the control template stored in app.xaml of label with the button which is in another xaml

Hello, I have prepared a control template for the label and stored in App.xaml because these control template is used by many labels in the xaml. Inside it i have a placed a storyboard in order to blink the label constantly. Here is the code for the same in App.xaml <ControlTemplate x:Key="LabelControlTemplate1" TargetType="{x:Type ...

Is there a way to ignore Visual Studio errors thrown by XAML?

I know you can do it in CodeBehind with something like this... #pragma warning disable 67 ... #pragma warning restore 67 But is there a way to do this type of thing in XAML? For example, I have the following in my App.xaml... <FontFamily x:Key="ExtendedFontFamily">Verdana</FontFamily> And it keeps throwing me these VS errors (even...

Application-level Resources in a Different Assembly

This question involves the Visual Studio (2008) WPF Designer's apparent inability to handle the usage of resources located at the App.xaml level if the App.xaml is in a separate assembly from the view. To simplify the explanation of the problem I have created a test application. This application has two assemblies: View and Start. The ...

How get this xaml to work from app.xaml

I made this UpButton.xaml file by converting it from an .ai-file that our graphics guys made but i just can't get it to work. I was thinking of making this some sort of template/style for buttons, but our buttons are made up from rectangles and not the button object. I've been fiddling with this since last Thursday, googled and tried ev...

DataTemplates in resource dictionaries don't inherit from app.xaml styles??

I added custom named styles to the app.xaml. I created an external resource dictionary (which I attach in the merged dictionaries of the app.xaml) and when I try to use one of the above named styles in the rcource dictionary, it says that there is no such style. Also the default styles (i.e. unnamed styles that apply for the entire app...

WPF : Access Application Resources when not referencing Shell from App.xaml

I am beginner in WPF. My App.xaml looks like below app.xaml <Application x:Class="ContactManager.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <Application.Resources> <Color x:Key="lightBlueColor">#FF145E9D</Color> <SolidColo...

How to use App.Xaml's ResourseDictionaries with own entry point

Hello friends. I created some logic for singleInstance application and I must to use my own entry point (not App.xaml) for Application. I have some styles in App.xaml which now is not working. How can I use this ResourceDictionaries from my App.xaml for entire project in my situation? My class for manage Application Startup public c...

Visual Studio 2010 uses Application.xaml; Blend 4 uses App.xaml

Previously all application level resources in a project I am authoring were stored in App.xaml. Then i decided to migrate from VS 2008 to 2010 and that is where the trouble started. After migrating, I tried to do a little testing using a testing window instead of the normal startup window. After changing the startup object, suddenly I...

Two way binding to a global 'boolean' in XAML?

There's quite a lot out there regarding binding a XAML StaticResource, such as a string constant to a XAML control. However I cannot find a good way to do two way binding in this scenario. I want to bind a global boolean to a checkbox which enables 'debugging' mode, that toggles visibility of certain things throughout my application. I...

Referencing Themes in a dll in WPF

Hi guys, I am using an opensource wpf TreeListView control. The control is a library project with a themes folder in it containing some xaml theme files. In my wpf project, I have got a reference to the control dll and I would like to know how to reference the dll themes in app.xaml. I tried doing something like this but it throws excep...

How to inherit/extend styles from a resource dictionary?

I am having trouble extending one of my styles that I have defined in the Windows dictionary. Alone, it seems to apply the style to my controls as expected. However, if try to extend the style in one of my userControls, using the basedOn property, it simply overrides the main one and all the base styles dissapear. Here's an example: ...

Exception with type System:Char

I am trying to create a reusable System:Char value in my xaml resources. I have: xmlns:s="clr-namespace:System;assembly=mscorlib" Then: <s:Char x:Key="MaskPromptChar">#</s:Char> I get an exception: The type 'Char' was not found. [Line: 8 Position: 44] But... I also have: <s:Double x:Key="DefaultControlWidth">200</s:Double> ...