By default, text is centered in the headers of a ListView (not in the content cells!), I've been struggling to make it left aligned, here's what I've come up with:
<ListView.Resources>
<DataTemplate x:Key="Templ">
<TextBlock HorizontalAlignment="Left" Text="{Binding}"/>
</DataTemplate>
</ListView.Resources>
...
<GridVi...
Do you know if it would be possible to create a framework myself in C# that utilizes the good things that XAML offers, such as dependency properties and data binding?
Or would I have to create everything from scratch myself?
...
Hi, I am trying to add a storyBoard to my stack panel and bind the trigger to a code behind property, but the stackpanel is not responding to the property changes.
here is the code:
<Window x:Class="DirectAccess.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microso...
So I have a Listbox:
<ListBox Grid.Row="0" Grid.Column="1" Grid.RowSpan="2"> //<----Item's Data Source Method Call Here?
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel
Orientation="Horizontal"
IsItemsHost="true" />
</ItemsPanelTemplate>
</ListBox.ItemsPan...
I have a control,where is combox. I bind to it properties from modelview. I can bind properties to textboxes, but not to combobox. Value from modelview is 4. Anyone know why is that ?
<ComboBox HorizontalAlignment="Left" VerticalAlignment="Top" SelectedItem="{Binding Path=QuantityOfStars}">
<ComboB...
Does anyone have a rich FocusVisualStyle to share?
I am looking for something like the Silverlight 4 one or Google TextBoxes in Chrome or like Visual Studio 2010.
Examples:
...
How can I use { symbol in xaml string? E.g.:
<TextBlock Text="{0}"/>
I can do it starting string with a space symbol:
<TextBlock Text=" {0}"/>
but I'm looking for a better solution.
...
Basically what I am asking here is how to display a XAML page within a tab control that is part of another XAML page. Or, for that matter, if this is even possible. I want to be able to click a button on page1 and be able to view the page2 from within a tab control that is on page1.
Would this be something to be handled within a Fra...
I am trying to get a layout where an icon floats on the right end of a textblock; the textblock grows/shrinks to content. I cannot make this happen without the textblock running outside the grid. For example:
<Grid x:Name="LayoutRoot" Width="500" HorizontalAlignment="Left" ShowGridLines="True" >
<Grid.ColumnDefinitions>
<ColumnDefini...
I have a Listbox with items created through databinding. The item template creates a custom view for each generated item. Each generated item view is its own user control.
I'd like to change the state of the listbox to something like "Details" vs. "Compact" and have each item have its own state changed automatically. The view item kn...
I have a Silverlight user control that contains an ItemsControl that renders a StackPanel containing another user control for each item in the data source, the XAML is as follows:
<Grid x:Name="LayoutRoot">
<ItemsControl ItemsSource="{Binding}" x:Name="ValuesItemSource">
<ItemsControl.ItemsPanel>
<ItemsPanelTempl...
Setting the IsHitTestVisible="false" has the effect of having the whole ComboBox's drop area unresponsive to clicks. The same goes for setting to true.
With a ComboBox I don't have to create any storyboard to make ComboBox animation like but I found this issue.
How can one make the ComboBoxItem area unclickable except for the button ...
Hi,
I have a Silverlight application that I am working on. I have a few different custom button styles that use a ContentTemplate to display an Image as a Button, such as:
<Style x:Key="CancelButtonStyle" TargetType="Button">
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
...
Hi all,
I have an ellipse that I'd like to programatically put into a canvas. Unfortunately, the ellipse only draws in the top right. Any help?
SolidColorBrush newColor = HotSquare(col);
Color newCol = getCol(col);
Color newCol2 = getCol2(col);
Ellipse el1 = new Ellipse();
el1.Height = 40;
el1.W...
Has anyone ever tried this? And I don't mean sending XAML to the browser but using XAML to build an ASP.NET control tree or something similar which then renders as HTML. XAML is intresting, HTML hasn't changed much and to my knowledge HTML5 is mostly more of the same.
...
I'm trying something along these lines.
//Somewhere in my app
System.Uri resourceLocater = new System.Uri("/MyApp;component/Users.xaml", System.UriKind.Relative);
var obj = Application.LoadComponent(resourceLocater);
//Invoke the renderxaml element
var image=RenderXamlElement(obj as UserControl);
//Then I may save this image to a fil...
Hello everyone,
I recently converted my solution from Visual Studio 2008 to 2010, hoping I would be able to use WPF 4.0's SelectionBrush property. I try to access this property in the XAML for my project as follows:
<TextBox SelectionBrush="Aqua"/>
Disappointingly, It underlines my code and says: The property 'SelectionBrush' was no...
I'm trying to understand binding to local items using XAML. I'll make this a two part question, but both deal with the same basic situation:
Say I have a custom user control called MySelector
MySelector includes a ListBox called listBox1
MySelector includes a List<string> property called TextList
TextList is a read-only property t...
Visual Studio 2010 - release - takes about 5 seconds to open a xaml file.
It does it on some machine, not all of them!
.cs files open instantly. It only happens to XAML.
We tried the following, unsuccessful:
Run VS as Administrator
import user settings from a machine that didn't have the problem
clear the borked registry using cclea...
How to create ← (←) in XAML? I want to create backspace button.
...