Rounded Corner of RichTextBox in wpf
It is possible to make RichTextBox have corner radius in wpf. i know it can achive using ControlTemplate but how? I hope some of you may provide me with a hint. ...
It is possible to make RichTextBox have corner radius in wpf. i know it can achive using ControlTemplate but how? I hope some of you may provide me with a hint. ...
Hi all, I want to capture mouse clicks on a TextBox: <Window x:Class="WpfApplication2.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"> <Grid> <TextBox x:Name="t" MouseDown="TextBox_MouseDown" MouseLeftButtonD...
I have the following directory structure Project \Images +view.png control.xaml and in the control I have a button defined by the following XAML: <Button Click="Search" Grid.Column="1" Margin="0,5,5, 0" HorizontalAlignment="Right"> <Button.Template> <ControlTemplate TargetType="{x:Type Button}"> ...
I'm trying to get sorting to work with a WPF Toolkit DataGrid. My DataGrid's rows are instances of view models. The row's view model exposes a view model for each column. Each column is data templated to a different user control. This is what my DataGrid's column declarations look like: <tk:DataGrid.Columns> <tk:DataGridTemplateColu...
Suppose I wanted to create an open source WPF project written in .NET. I don't have a copy of Expression Blend, nor do I have the skillz in graphic design to make my own controls that look good. I love Developer Express' controls, but they cost an arm and a leg and I don't see how their per-developer licensing would make it possible to u...
The following code, behaves little strange. <ListBox SelectionMode="Multiple"> <StackPanel> <TextBlock>Selection is Black</TextBlock> </StackPanel> <ListBoxItem> <StackPanel> <TextBlock>Selection is White</TextBlock> </StackPanel> </ListBoxItem> </ListBox> Note that first selection stay...
Hi, I'm just getting started with Linq-to-SQL and data binding in WPF, most of which works like a dream so far! I've got (what I though was) a common scenario: a) Query list of records from a table via datacontext and bind to the current user control this.DataContext = db.ClientTypes; b) Have the user see a bound ListView and some ...
Hi all, I'm using the progress bar of WPF and set the value until the max value. But, when reached, the animation (that's the green effect) continues. How can I stop it and have a full filled green bar, without any animation ? for example, take this : <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/w...
I have a WPF ListBox control and I'm setting it's "ItemsSource" to a collection of item objects. How can I bind the "IsSelected" property of the ListBoxItem to a "Selected" property of a corresponding item object without having an instance of the object to set as a binding.Source? ...
I'm very new to databinding, and so far have only had luck databinding to element properties in the GUI, or by binding to an ObservableCollection to display lists of data. Now I want to do something different. I have a method that takes an index and returns a List of doubles, i.e. List<double> GetValues( int index); I have a GUI whe...
What is the best way to implement an auto-suggest feature for a textbox in WPF? I have found various article that are convoluted (and old) and some also suggest that there is a control available for this (but its not in my current WPF toolkit). What's the latest/best method for implementing auto-suggest as a user is typing in to a textbo...
When you bind properties to a view how do you handle the properties visibility and edibility for users and object state? I have seen several examples of using an authorized attribute on the poco's property. But this does not seem flexible. The best that I could come up with was to store this display information in a dictionary the vi...
Is it even possible? ...
I'm wondering how can I set default UpdateSourceTrigger to PropertyChanged for all TextBox'es on window? Is there any simpler way than using Find&Replace? ...
Hey guys! Here is the deal... I have a ComboBox defined in my window. The content of this comboBox, is only a string list with all values in Brushes class. Nothing special so far... But what I'm trying to achieve is a way to change the combobox background color when the user changes the color. The color would be the value selected in t...
I have a grid with 4 buttons...1 row, 4 columns. I am looking for a way to visually group the two buttons on the left from the two on the right. I was looking for a way to do this with a separator but it doesnt seem to be playing nice with Grid, preferring StackPanel. Is this the right control? If so, how does one make the thing separ...
I have a set of coordinates. I would like to take, for instance, the first 5 and draw a line connecting 1 to 2 to 3 to 4 to 5. Then after a pre-determined duration, I'd like to remove the first point and add the 6th point. In doing that, I'd like the line to animate in such a way as the "beginning" of the line moves from point 1 to point...
Hi. I'm wondering if I can do something like this with CollectionViewSource too. I have a DataTemplate that looks like this: <DataTemplate DataType="{x:Type local:MyObject}"> <StackPanel Orientation="Horizontal"> <Grid> <Image Source="Images\gear16.png" /> <Image Source="Images\disk.gif" HorizontalAlignment="Right" ...
Hi I want to bind the following XML to a couple of controls in WPF. Each category name should bind to the items source of a combo box, then when a category is selected in the combo box I want to bind the list of Products from the selected category to a listview Here is the XML: <?xml version="1.0" encoding="utf-8" ?> <Categories> ...
I can't understand why this doesn't work, or what I need to get it to work. To repro, create a simple WPF application and replace the main window's constructor thusly: public MainWindow() { InitializeComponent(); // simple visual definition var grid = new Grid { Width = 300, Height = 300 }; var ...