Hi all,
I'm creating a button with a down arrow:
The arrow is actually a button within a button.
When the mouse is at the location I pointed out with a red dot it looks like this (which is good):
The inner button lights up okay. But when going slightly up it looks like the following picture (not good, the inner-button is not sel...
Hello! How do I access the contents in a resource dictionary using C#?
for example, here is my code in XAML:
<system:String x:Key="NewGroup">New Group Name</system:String>
and i want to access it here in C#
private void OnAddGroup(object sender, ExecutedRoutedEventArgs e)
{
BooksGroupInfo group = new BooksGroupI...
Is it possible to use binding to add objects to a XAML collection.
something like
<x:Array Type="sys:Int32">
<Binding Source="obj", Path="Prop1"/>
<Binding Source="obj", Path="Prop2"/>
</x:Array>
...
I've created a control in blend (xaml and code behind), saved it, and rebuilt the entire project. Now, not only does this new control not appear in the Assets tab in blend, none of the other user controls i've created appear either. I've rebuilt several times, blown away the obj and bin directories and rebuilt again, to no avail. How ...
Hi
I am trying to make a tree list view that displays different information compared to the parent.
From what i have now, the Children display the same information as the parent. I was wondering, how i would do this. The last post i had didn't really quite make sense to me, it didn't work really well. I was wondering if anyone can expl...
I want to produce in code the equivalent of this in XAML:
<TextBlock
Text="Title:"
Width="{Binding FormLabelColumnWidth}"
Style="{DynamicResource FormLabelStyle}"/>
I can do the text and the width, but how do I assign the dynamic resource to the style:
TextBlock tb = new TextBlock();
tb.Text = "Title:";
tb.Wid...
I am creating a TextBox with the following code:
TextBox textBox = new TextBox();
textBox.Name = propertyName;
textBox.Text = value;
textBox.Width = FormControlColumnWidth;
textBox.SetResourceReference(Control.StyleProperty, "FormTextBoxStyle");
sp.Children.Add(textBox); //StackPanel
FormBase.Children.Add(sp);
On a button click, I wa...
Hi,
I have a TextBlock that's on top of a Button in a Grid. I'd like to have then displayed thus:
"some very long text" <-- text
"that doesn't fit" <-- text wrapped
[my button text size] <-- button
However, what I've got is this:
"some very long text that doesn't fit" <-- text
[my button text...
Why does FindName() return null in the following example?
XAML:
<Window x:Class="TestDynamicTextBox343.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<StackPanel>
<Border >
<D...
Hi there,
how can i inform all subControls in WPF that they shall for example expand? Not every SubControl shall be informed.. only those who can e.g. accept an other element for drop.
Perhaps you know another posibilty to let the items change their color when they do accept specific dropContent.
Thanks,
el
...
Hi,
I have a class with the following properties:
Message(string), Added(DateTime) and LogLevel(string)
In my App.xaml i have the following:
<Application.Resources>
<ImageSource x:Key="Critical">Gfx/Log/Critical.png</ImageSource>
<ImageSource x:Key="Info">Gfx/Log/Information.png</ImageSource>
<ImageSource x:Key="Error">Gfx...
I was able to recreate this XAML DataGridTextColumn:
<tk:DataGridTextColumn
Binding="{Binding FirstName}"
Header="First Name"/>
in code like this:
DataGridTextColumn dgtc = new DataGridTextColumn();
dgtc.Header = propertyLabel;
dgtc.Binding = new Binding(propertyName);
theDataGrid.Columns.Add(dgtc);
But how do I recreate th...
I have a method creating a cone, such as in the following code snippet.
Could you explain me how this cone created by CreateCone(...) can be used in a XAML file in the same solution.
C# Code snippet :
public partial class MainWindow : Window
{
public Window()
{
InitializeComponent();
CreateCone(new Point3D(0, 0, 0...
hi, here's my problem:
I want all texts in TextBlock, Label, MenuItem.Header to be displayed in upper case.
The strings are taken from a ResourceDictionary e.g.:
<TextBlock Text="{StaticResource String1}"/>
<MenuItem Header="{StaticResource MenuItemDoThisAndThat}
etc. (also for Label and other controls)
I cannot use a value c...
Hi,
I have the following Menu witch works to some point ... then I added the two MenuItems under the Binding Item ... so each binded item would get a Delete and Edit MenuItem.
<MenuItem x:Name="miUserList" Header="User" Click="miUserList_Click" >
<MenuItem Header="Add new user"></MenuItem>
<MenuItem.ItemTemplate>
<DataT...
In WPF and Silverilght, what are the rules for deciding if you inherit properties from the visual, declarative, or logical parent?
...
What's required to create a style for a RichTextBox that includes visuals for the scrollbars and a background color for the space behind the text?
...
Hi.
I have tree list view NOT A tree view.
I would like it to display different information than the parent.
With the different columns
I want to have the parent to display:
Name Task and Activity code.
The CHild to display
Start Time End Time and Total Hours.
But i would like the child columns to match the parent columns such ...
Hi All,
I have a 3D object created by a method in behind code - C# and want to use in XAML code in the same solution.
Could one say me how to do, please.
Thanks.
J.R.
...
I have created a XAML UserControl that is used to enter the current date using some up/down controls. The interesting parts of the UserControl are as follows:
<UserControl x:Class="MyApp.Controls.DateEntry"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:uCon...