xaml

Any suggestions for best practices to follow when creating UI prototypes using sketchFlow for multiple screen sizes?

Hi all am looking to prototype the UI for an windows application. The app will be deployed on several display devices with different (physical) screen sizes and aspect ratios. Would like to be able to generate scenarios optimized on one display and quickly check if the layout is OK on different screen sizes, orientations. That is, I'd l...

Object Reuse in XAML

I have a user control which is referenced in another application. This user control is part of a data template. Now i have a grid which uses this data template, so ideally if there are 1000 rows then 1000 user controls will be created. My question is there anyway to create only one instance of user control in XAML and then reference it...

Context Menus and NavigateTo in Blend / SketchFlow

Hi All, Hoping this will be a simple one, in Sketchflow i'm trying to wire up a context menu to navigate to another page. I've created the context menu, added a menu item, right clicked the mneu item in the Objects and Timeline panel and selected navigateto. When i run it, the menu comes up but when i click on the menu item it doesn't ...

download Ribbon Control for WPF ???

From where should i download ribbon control ? ...

How can I make the code-behind of UserControls inherit a base class?

I've got a page manager that keeps a collection of pages (usercontrols), sends itself to each page which can thus call its SwitchPage method at anytime enabling me to put in links from one page to another. This works well and allows me to have a quick menu etc. public partial class PageManager : UserControl { private Dictionary<stri...

How could you enable a WPF application to create user controls on the fly?

How could you create an application that could search through a directory, find user controls in the form of paired .xaml / .xaml.cs files, and compile/execute these on the fly? Is this possible? Is there an .exec() or .compile() class somewhere that could do this? Basically what I want to do with this is have a WPF application that is ...

[WPF] Button turns invisible on Windows 7 machines without Visual Studio installed

We have a window that displays fine on all of our Windows 7 development machines with Visual Studio but not on the ones without Visual Studio installed. We have a simple OK/Cancel button pair and on the affected machines the OK button is invisible but if you click in the place where it should be it still works. Here are the styles used:...

How to keep an area a constant/relative size while user expands/collapses treeview?

I have a window that will be a variable size, currently it is 300 x 400 as shown below. In the top part I have an expandable tree view In the bottom part I have a long horizontal panel with a button in it. I want the top area (treeview) to be about 95% of the height, with the button tool area a constant 50 high. I want these proportio...

How can I get MouseLeftButtonDown to work on TreeViewItem like it works on TextBlock?

How can I attach a click event on to a TreeViewItem? The following works for the TextBlock but not the TreeViewItem: XAML: <Window x:Class="TestClickTree2343.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="...

Is there a way to attach an event in a XAML style?

I want every clickable TreeViewItem to execute TreeViewItem_MouseLeftButtonDown, is there a way to put this in the style so I don't have to define it everywhere. I could run through all children in code behind but I would think there would be an easier way to do it in a style. The following code gives me: Cannot find the Style Prope...

How to change the color/opacity of the triangular icon on a TreeViewItem?

Some of my TreeViewItems are clickable and some are not. For those that are not clickable, I changed the Foreground color to gray. However, if that item has children, I want to also change the little triangular bullet to gray. How can I do that, something like this: //PSEUDO-CODE: <TreeViewItem IconBulletEnabled="False" IconBulletCo...

Silverlight 3 - binding enum to combobox from DomainServiceContext

Hi, I just started playing around with Silverlight and a supposedly simple thing like binding a Combobox is driving me nuts. I read a bunch of articles now but none really address the issue that I'm after or were made for Silverlight 2 and don't seem to work. Let's say I have an entity object "User" which has a "UserStatus" field. In t...

Need help with a custom Style in WPF

I'm attempting to build some simple custom styles for the WPF Toolkit DataGrid control. I have a style for the overall DataGrid and a style for the DataGridColumnHeader. I am not setting any control templates, only basic properties. Here is what my sample DataGrid looks like with my custom styling applied: The header has the gradien...

Passing Click Events in Composite WPF/XAML Controls

So, let's say I have a DataTemplate <DataTemplate x:Key="ProjectsDataItemTemplate"> <ComboBoxItem x:Name="ProjectComboBox" Opacity="1" HorizontalAlignment="Stretch" Foreground="#FF80BBD2" VerticalAlignment="Center" VerticalContentAlignment="Center" Background="Transparent" Style="{DynamicResource ComboBoxItemStyle1}"> <StackPanel> ...

Reusable Custom Content for Buttons

My user interface makes use of customized buttons: They contain both an image and a label. I customized a single button manually, by setting its content to a grid holding an image and a label. However, since I need to have several such buttons, with different images and labels, I'd like to "extract" this pattern into something reusable...

Is it possible to inherit XAML?

I have usercontrols which inherit a base class which looks like this: BasePage.cs: using System.Windows.Controls; namespace TestPageManager23434 { public class BasePage : UserControl { public string ButtonPreviousText { get; set; } public string ButtonNextText { get; set; } protected PageManager pageMa...

XAML equivalent to DIV in HTML?

What I want to be more specific is an element I can use for grouping a set of other elements, without effecting their layout. The only thing it should do besides giving a nicer XAML by grouping related elements in their own parent tag is to propagate ambient properties such as DataContext. It should be a purely logical element without an...

wpf grid xaml layout

I am writing my UI mostly in XAML without a wysiwyg in grids you can do <textbox Grid.Column="0" Grid.Row="0" ... when creating a grid comming from a html background i have been doing ... <textbox Grid.Column="0" Grid.Row="0"> <Label Grid.Column="1" Grid.Row="0"> <textbox Grid.Column="0" Grid.Row="1"> <Label Grid.Column="1" G...

How can I bind a custom object in code-behind to a Grid in XAML?

In the following example, the Message property binds correctly but the FirstName, LastName and Age properties of the Customer object are blank. Why is that? XAML: <Window x:Class="TestBinding9922.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...

Is there a use for XAML <ColumnDefinition>Something Here Example</ColumnDefinition>?

Hi, I was just creating a Grid in my XAML when i noticed that Visual Studio automatically creates ColumnDefinitions like this: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> </Grid> I always stop this from happening by using the s...