wpf

Does WPF break an Entity Framework ObjectContext?

I am getting started with Entity Framework 4, and I am getting ready to write a WPF demo app to learn EF4 better. My LINQ queries return IQueryable<T>, and I know I can drop those into an ObservableCollection<T> with the following code: IQueryable<Foo> fooList = from f in Foo orderby f.Title select f; var observableFooList = new Observa...

DataTrigger doesn't work

I have this in XAML in my style: <DataTrigger Binding="{Binding Path=ButtonStyle}" Value="CutLeft"> <DataTrigger.Setters> <Setter Property="CornerRadius" TargetName="border" Value="0 11 11 0" /> <Setter Property="CornerRadius" TargetName="border1" Value="0 10 10 0" /> </DataTrigger.Setters> </DataTrigger> And this XAML in ...

TabItem from external XAML is displayed in content area in TabControl. Why and what to do?

Basically this is the following to this: http://stackoverflow.com/questions/1226622/why-are-tab-headers-displayed-in-the-content-area-of-tabs-in-a-xaml-tabcontrol So, I have some TabControl: <Window x:Class="MyApp.HostTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.c...

Split WPF Style XAML Files

Most WPF styles I have seen are split up into one very long Theme.xaml file. I want to split mine up for readability so my Theme.xaml looks like this: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <ResourceDictionar...

Stafflynx application for Silverlight? Sample code to download?

I found Stafflynx WPF application just amazing: http://www.dnrtv.com/default.aspx?showNum=115 Anyone knows if is applicable for Silverlight? Where can I download it? (sample code) Thanks! Rodrigo ...

Silverlight: making a grid cell always visible, even during scrolling

I have a page (telerik:RadPage) containing few grids and some nested controls and I was wondering how I can: have a particular cell in one of the grid make always visible even during scrolling. I am not even sure if it is possible, but the one cell I want visible is the first one I am displaying. Any help is appreciated and all suggest...

How build this animation?

Hi All I can't build this animation: http://blog.pixelingene.com/?p=368 Show a working version please =) Thanks, Ben ...

Is it possible to seletively color a wrapping TextBlock in Silverlight/WPF

For instance, if I have a TextBlock: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill...

WPF, convert Path.DataProperty to Segment objects

I was wondering if there was a tool to convert a path data like "M 0 0 l 10 10" to it's equivalent line/curve segment code. Currently I'm using: string pathXaml = "<Path xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" Data=\"M 0 0 l 10 10\"/>"; Path path = (Pa...

Setting style of ContextMenu on subitems

I have created a custom style and template for MenuItem and ContextMenu, and for my first level, that works great, but whenever I add a SubMenu item, the style of that ContextMenu reverts back to the default style. How can I make sure that item uses my custom style? I've tried using the <;Style TargetType="ContextMenu" Key="{x:Type Conte...

WPF: ContextMenu item bound to a Command is enabled only after invoking the command from another source. Why does this be?

I have a ContextMenu whose items are all bound to commands and enable\disable correctly after ANY Command is invoked from another source but prior to, they are all disabled. So if I run the app, all the MenuItems are disabled but if I invoke any of the bound commands from another source (buttons, for instance) they become synchronized w...

Best way to implement a Parsing/Editable Richtextbox in WPF

I'm trying to implement (as a prototype initially), a richtextbox control which can be parsed in real time to apply certain formatting options to it. This is being done in WPF so I thought the best way to go about it would be to extend the existing rich text box control. I've run into the issue where it isn't documented well and the exa...

How are views constructed in Josh Smith's MVVM sample?

Being new to both WPF and MVVM, I'm studying Josh Smith's article on the MVVM pattern and the accompanying sample code. I can see that the application is started in app.xaml.cs by constructing a MainWindow object, wiring it to a MainWindowViewModel object and then showing the main window. So far so good. However, I can't find any code ...

WPF Key-Binding- Can I create a single key-binding that fires a command every time control is pressed with any number and then passes the number to the command as a parameter?

I need to create hot-keys for every control + number combination and would prefer not to have create ten commands. Is there any way to do this? ...

C# WPF Apllication class

My application consists of App.cs/App.xaml and some other files. Everything is compiled to an exe file. However, I want a 2nd application, which should reference the first one. In this application is a class derived from App. But when I call the the Run() function I get an very strange error in the XAML code of the first application, say...

Implement INotifyPropertyChanged on DataContext in WPF?

When doing databinding does one have to implement INotifyPropertyChanged on the datacontext in WPF? ...

Best practice to create WPF wrapper application displaying screens on demand.

Context: I'm developing a WPF application which will contain a lot of different "screens". Each screen contains a which on its turn contains all the visual elements. Some elements trigger events (e.g., checkboxes), a screen has individual resources, etc. The main application is "wrapper" around these screens: it contains a menubar, to...

load directx xfile in xaml/wpf

How can I load a .x file in xaml/wpf? ...

In WPF XAML how can I concatenate 2 constants so I can use pre-define paths?

I'm new to XAML, so presume I'm missing something simple. I want to replace the path part of the source path with a c# constant for easier path management, for example I have: <Image Source="/Images/Themes/Buttons/MyPicture.png" /> and in another class I have my constant defined: public static readonly string UriImagesButtons = "/Ima...

Custom Message Box in WPF - What project type?

I have a WPF Composite application and I want to create a customized messagebox, I wondered what project type I should use to create it? A usercontrol A WPF Application A Class Library I have to then be able to use this MessageBox in other places in my application. ...