I don't know how to link successfully a StoryBoard to a TranslateTransform that is part of a ContentControl. I always get the following error when I try to run my StoryBoard:
'RenderTransform' property does not point to a DependencyObject in path '(Children).[0].(Content).(0).(1)'.
I guess I don't know how to define a TargetPropert...
Hi I am trying to have a MenuItem.Icon set thru a style setter:
<Style x:Key="MenuItem_Delete" TargetType="MenuItem"
BasedOn="{StaticResource {x:Type MenuItem}}">
<Setter Property="Header" Value="_Delete"/>
<Setter Property="MenuItem.Icon">
<Setter.Value>
<Image Source="Resources/Delete.png"/>
...
One of the apps I am building needs to build a survey for users to take. The relevant classes related to my question are:
Survey (string Description, List<Questions> Questions, QuestionTypes Type)
Question (string Description, List<Choice> Choices)
Choice (string Description)
enum QuestionTypes {MultipleChoicesOneAnswer, MultipleCho...
I want to achieve something like the following (Notice the DataContext property of the Window element):
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{Binding MyDataContext}"/>
Class Window1
Public ReadOnly...
Hi!
I have a login form that contains a username textbox and a password box.
I want the ok button to be enabled only when both the fields contain a value.
I have a converter that check for all the strings if they're null or empty.
I placed a breakpoint on the first line of the Convert method, and it stops only when the MenuItem initial...
I have a Silverlight user control that has no template and does not need one as it is simply a path with a RectangleGeometry that is resized by code. Now our designed has added a template to the tooltip of the path and I want to be able to provide a method for users of the control to change the layout of a portion of this template. If th...
How can you set Height="*" and Height="Auto" in code behind?
...
(this question is a refinement of my other question on this topic which was a bit complicated but I really want to understand why this doesn't work so here's a more straight-forward example)
WHAT I WANT TO DO: create a simple class (no XAML) in one project which inherits a WPF UserControl (with XAML) in another project.
Here is my inhe...
hello everybody,
i'm new to wpf and this is my first attempt of creating a custom user control. its purpose is to display two values (myText1 and myText2) with their corresponding images (myimage1, myimage2). sometimes, one of these values is not set and therefore oneimage should be hidden as well. here's my code so far:
Window1.xaml
...
Hi,
I have a Usercontrol in a UserControl libracy (seperate assembly) i have in my xaml markup like this:
<UserControl x:Class="CenterTextTemplate.CenterTextTemplate"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Name="Test"
Height="Auto" Width="Auto">...
There is a plenty coding guidelines/standards available for c# language. However I couldn't find anything "official" regarding XAML. I'm particularly interested in naming conventions of the visual elements, but something about formatting would be also useful. At the moment my XAML files look like a big soup of tags, not really human read...
I'm using XAML for serializing some objects and it's working great for the most part.
The problem I'm now facing is when I change the data structure all the old objects produce an exception like the one below. I don't mind if the values are lost.
Is there a way to turn off these exceptions and just have the xaml reader ignore unknown ...
In Expression Blend, you can view and edit the control template of objects in the "Objects and Timeline" panel. I'm wondering if there's an equivalent feature in Visual Studio or if there's something free (or very inexpensive) I can download that will allow me to do this.
Here's a screen cap from Expression Blend that shows what I'm tal...
I was using the XamlPad from the .NET SDK, so I did a quick search for something similar but with more features and utility.
My search turned up multiple alternatives, so I was wondering if anyone had any specific recommendations on which XamlPad alternative to choose.
...
hello,
i've got two comboboxes with the same content. the user should not be allowed to choose the same item twice. therefore the comboboxes' contents (= selectedindex?) should never be equal.
my first attempt was to comapare the selectedindex with a datatrigger to show/hide a button:
<DataTrigger Binding="{Binding ElementName=comboBo...
Yet another strange WPF error:
I have a custom control in a simple XAML page. The project builds and runs perfectly, with no errors. Here's the XAML:
<Window x:Class="Grapher2.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:graph="clr-namespace:Gr...
Hi everyone!
I was wondering if anyone knows how to use the TreeListView in WPF/XAML/Expression Blend. Without using the code behind.
This what I want to do. I would like to populate a TreeListView with information, if the information's client and matter are the same, then just make that item a child of it.
Example:
Client 1= Kevin, ...
Either I'm not as intelligent as I once believed or the UI in Blend is really this bad.
Is there any way to 'refresh' changes I've made to an XAML file in the designer? Something simple like changing 'Fill="Red"' to 'Fill="Blue"' does not show up in the designer unless I close and re-open the file.
Google and SO were sadly and surpri...
I want to do something like this:
<combobox x:Name="cboCustomers" ItemsSource="{Binding Path=Data.Customers}"/>
<combobox x:Name="cboInvoices"ItemsSource="{cboCustomers.SelectedItem.Invoices}"/>
Anyone know of a way to do something like this in Silverlight 3? I am sure there is some information about it out there, but I am having bad...
What should I put for BasedOn in this style?
<Style
x:Key="DataGrid_ColumnHeaderStyle"
TargetType="wt:DataGridColumnHeader"
BasedOn="??????????"> <!-- I want this to be a reference to the default style -->
<Setter
Property="BorderBrush"
Value="{StaticResource Media_RaisedBorderBrush}" />
<Setter
...