Hey,
I'm using a Separator to draw a vertical line inside a Border. At first this was ok because the line needed to be centered, but now I need to position it at a custom x-position from the left border. Is there a way to do that?
<Border x:Name="border" ClipToBounds="True" Background="White" BorderBrush="Black" BorderThickness="2">
...
Say I have a ComboBox, like so:
<ComboBox IsEditable="True" Height="30">
<ComboBoxItem>robot</ComboBoxItem>
<ComboBoxItem>Robot</ComboBoxItem>
</ComboBox>
If a user comes along and starts by typing a lower-case r into that ComboBox when it is empty, the ComboBox predictably auto-fills itself with the word robot. Great.
Now ...
Do you know how can I subscribe to an event of the base of my customControl ?
I've a custom control with some dependency properties :
public class MyCustomControl : Button
{
static MyCustomControl ()
{
DefaultStyleKeyProperty.OverrideMetadata( typeof( MyCustomControl ), new FrameworkPropertyMetadata( typeof( MyCustomCont...
We have a WPF app that has a DataGrid inside a ListView.
private DataTable table_;
We do a bunch or dynamic column generation ( depending on the report we are showing )
We then do the a query and fill the DataTable row by row, this query may or may not have data.( not the problem, an empty grid is expected )
We set the ListView's It...
I have a wrap panel full of usercontrols. When I hover the mouse over a usercontrol I want it to expand to show more details.
Some stripped down sample code:
<UserControl x:Class="WPFTestBed.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
...
we are designing a application with WPF/WCF... where we had lot of business leaked into the client code so inorder to avoid and make it clear we want to use the Domain Driven design . But where exactly my domain model will Sit .. in Server or client.
Note :To explain more about architecture
we have WPF with MVVM we are bin...
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...
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...
I'd like to display a WPF app's console so I can run scripts on my application. I have been using the ConsoleManager class in this thread. I'm not sure what happened, but now, I am unable to input any text. Anytime I call Console.ReadLine(), it immediately returns null. Turns out that Console.In is a NullTextReader.
How can I make sure...
I have a ListView who's ItemsSource is set to an ObservableCollection. The user can sort and filter the ListView, done by using the CollectionViewSource.GetDefaultView and altering the ICollectionView Filter and SortDescriptions.
When the user right-clicks a row, they can add an item to the collection. I want this new row to appear be...
Would you mind tell me why? :)
...
Hi, I have an ExceptionValidationRule on my TextBox:
<Window.Resources>
<Style x:Key="textStyleTextBox" TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="true">
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Err...
Hello,
I speak about josh smith article.
can anyone show me please how the CustomerView.xaml specifically this:j
<TextBox
x:Name="firstNameTxt"
Grid.Row="2" Grid.Column="2"
Text="{Binding Path=FirstName, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"
Validation.ErrorTemplate="{x:Null}"
/>
Why is ther...
How to limit the rows and columns of ShowGridLines in WPF Grid?
By default, ShowGridLines will be applied to all rows and columns, is there any way to set the rows and columns that ShowGridLines is effective?
Thanks
...
Here's my code:
<ComboBox Grid.Column="1" Grid.Row="9" ItemsSource="{Binding Path=PriorityEntries}" SelectedItem="{Binding Path=Priority,Mode=TwoWay}"/>
The comboBox is bound properly with PriorityEntries, and when i change the value of the comboBox the "set" of the bound property(Priority) is called setting it to what it needs to be....
I'm attempting to position my perspective camera 30 units above the origin and pointing straight down.
If I set the LookDirection of the camera to "0,0,-1", however, everything disappears. I have to make it "0.01,0.01,-1" for it to work. Why?
<Window
x:Class="ThreeDeeTester.Window1"
xmlns="http://schemas.microsoft.com/winfx/200...
This is a simple Question (lets see)
I want to bind bitmap image to Image. For doing this in cs code u must write this line.
this.leftImage.Source = new BitmapImage(new Uri(@"C:\a.bmp"));
But I want make Binding from resources. Because In release time resources became part of project.exe file and if you make binding from file(Mean se...
I'm building a custom WPF control that derives from TabControl. In the ControlTemplate, I'm using a ItemsControl to display a list that is being bound from the template (an observable collection of type FileMenuItem). During program execution, I'm getting the following error in the output window:
ItemTemplate and ItemTemplateSelect...
Is it possible to reload a wpf control or windows?
...
I've heard about the possibility to use attached properties to avoid writing a custom control in WPF.
Could you explain me how or address me to a tutorial?
Thank you
...