xaml

WPF Custom Buttons below ListBox Items

WPF Experts - I am trying to add buttons below my custom listbox and also have the scroll bar go to the bottom of the control. Only the items should move and not the buttons. I was hoping for some guidance on the best way to achieve this. I was thinking the ItemsPanelTemplate needed to be modified but was not certain. Thanks My ...

ComponentResourceKey that uses DynamicResource for value

I'm trying to define a set of brushes using ComponentResourceKey notation that align themselves with the colors provided by the SystemColors object. Here's what I know how to do (I have an example that follows): 1) I know how to define an inline brush that uses the SystemColors object (Brush1 in my example) 2) I know how to define and...

WPF Remove Extra Space on bottom of ListBox

Hello all, I am getting a large amount of space under my custom listbox if I add an item with multiple lines of text. What can I do to solve this? My code <!-- List Item Hover --> <LinearGradientBrush x:Key="MouseOverFocusStyle" StartPoint="0,0" EndPoint="0,1"> ...

Problem Binding to a Brush Property in WPF

Working in WPF, writing a custom user control. I am trying to change the background property of the Border element when I change the value of a property of the class. Right now I am working on simply binding it to a DP, though if there is a better way I am open to suggestions. Here is the XAML for the UserControl <UserControl x:Class="...

Silverlight 4.0: DataTemplate Error

Im trying to get the specific template in my resource dictionary. This is my resource dictionary <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:view="clr-namespace:Test.Layout.View" xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" xmlns:x="http...

XAML trigger as StaticResource

Why can't I create a trigger and use it as a static resource in XAML? <Window.Resources> <Trigger x:Key="ValidationTrigger" x:Shared="False" Property="Validation.HasError" Value="true"> <Setter Property="FrameworkElement.ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, P...

How to control the whole DataGridCell background and not just the text part?

Hi, I'm trying to control the DataGrid cell background in a column conditionally on its value. Unfortunately I'm getting something like this: Which is not very aesthetic, I would like to have the whole cell in a different colour, not only the part behind the text. Here is the code part: <DataGridTextColumn Binding="{Binding Path...

"Genie" animation effect in XAML

What would the XAML look like to create a Genie animation effect? Take an object of any size/shape, and "Genie" it to another Minimized location. Kind of like the OSX window minimize. Maybe even a little fancier through a smoke-like effect where the path is more switch back, instead of a simple funnel (if that makes any sense). I'm gues...

Resharper doesn't play well with XAML?

I've been noticing a pattern with ReSharper (both 4.5 and 5). Very often (almost always) when I have solution-wide analysis turned on, and WPF code in my solution, ReSharper will mark a number of the .xaml.cs files as being broken. When I navigate to the file, sometimes it magically updates and displays no errors, and other times I hav...

Binding WPF ComboBox in XAML - Why is it Empty?

I am trying to learn how to bind my simple database (.sdf) to a combobox. I created a dataset with my tables in it. I then dragged a table from the DataSource onto my control. There are no build warnings/errors, and when it runs, the ComboBox is empty. <UserControl x:Class="OurFamilyFinances.TabItems.TransactionTab" xmlns="http...

How can data templates in generic.xaml get applied automatically?

I have a custom control that has a ContentPresenter that will have an arbitrary object set as it content. This object does not have any constraint on its type, so I want this control to display its content based on any data templates defined by application or by data templates defined in Generic.xaml. If in a application I define some da...

UserControl as ListBoxItem and IsSelected

I have a usercontrol that I want to use as a ListBoxItem. <ListBox.ItemTemplate> <DataTemplate> <local:MyUserControl/> </DataTemplate> </ListBox.ItemTemplate> I'd like to play a storyboard when the usercontrol is unselected. <UserControl.Resources> <Style TargetType="{x:Type UserControl}"> <Style....

XAML Newbie Question

Can anyone recommend some reference sites and books for learning XAML? I basically need to get up to speed as quickly as possible. Thanks. ...

XAML ComboBox Bind to Property

If I have a property in my C#; public CollectionView Months { get { CollectionView retList = new Enumerations.Months().ToCollectionView<Enumerations.Months>(); return retList; } } And I have a ComboBox; <ComboBox x:Name="ddlMonth" Grid.Row="3" Grid.Column="1" ItemsSource="...

wpf app invisible remotely (via radmin)

hi gang, I've built a little WPF utility that watches a serialport and visualises monitoring information with WPF. It works fine, but a colleague just tried using it from another machine via radmin and my app is completely invisible! if you're at the machine you see it, if you view it via radmin you see the same screen but no app. Inste...

How to remove the shadow from a librarystack

I'm currently in a project where I need a LibraryStack with no visuals at all, so it would just show the content. If I just remove the background a shadow stays in view which I cant seem to remove... This code looks like: <s:LibraryStack Background="Transparent"> <s:LibraryStackItem Background="AliceBlue"/> <s:LibraryStackIte...

DataTemplate Xaml ,make a Datagrid custom

hi, I'm actually looking for solutions to edit a kind of a datagrid. Explanations : I have a list of data A, and a list of data B and i would like to attribute an element of list of data B to an other element in list of data A. I would like to use DataTemplate,but I'm blocked with the radio button inside the grid. This is an image of ...

resharper naming rules for xaml namespaces

In Resharper 5.0 when I use a type in XAML that I don not have a nampsace include for yet, it automatically adds the namespace as follows: xmlns:ViewModel="clr-namespace:MyNameSpace.ViewModel" How can I force it to use abreviations like this: xmlns:vm="clr-namespace:MyNameSpace.ViewModel" ...

How to make XmlnsDefinition work on the local assembly?

I've started using the XmlnsDefinition attribute to tie together some CLR namespaces into a single xmlns for convenience in XAML. Unfortunately, it seems that this only works when using foreign assemblies. If I have a XAML file in the same assembly as the types that are in the namespace I'm referencing from XmlnsDefinition, then the com...

XAML ComboBox SelectionChanged Fires OnLoad

If I have a ComboBox that has a SelectionChanged event, it fires when I'm loading the control. So at page load I set the SelectedValue and the SelectionChanged event fires which is not what I want to happen. What is the accepted apporach to stopping this? ...