I am currently learning to create custom controls in WPF. I successfully created a simple custom control using a Label and a Text Box. I was able to allow setting the Label text by DependencyProperty.
Now I am creating a user control that has a ComboBox. I need to allow adding items to this ComboBox from outside the control.
To achiev...
Hi guys,
I have a border, i want the background of this border to be partially transparent (opacity 0.8) but i do not want the image behind it to be well defined. The effect i am after is similar to the Windows Vista window border effect, where you can see that something is behind it but you cant tell what it is.
A few clarifications:...
I have a datagrid with one column having a radio button. I want to set the GroupName when a certain condition is reached. Below is the code
<Custom:DataGrid.Columns>
<!-- ONLY ENABLED WHEN THE ITEM TYPE IS SINGLESELECT OR SINGLESELECT WITH ADDIOTIONAL DATA-->
<Custom:DataGridTemplateColumn Ca...
I want to show a different icon/image depending on an enum value. For example, if I had the following enum:
public enum UploadStatus
{
Unknown = 0,
WaitingToUpload = 10,
Uploading = 20,
Uploaded = 30,
UploadFailed = 40
}
I'd like to write XAML that looks something like this:
...
<EnumImage Value="...
Visual Studio 2010 RTM randomly crashes when editing XAML in a WPF application. I'm running it on Win 7 fully updated.
The installed extensions/addons are:
Resharper
PowerCommands
The crash log is:
Faulting application name: devenv.exe, version: 10.0.30319.1, time stamp: 0x4ba1fab3
Faulting module name: clr.dll, version: 4.0.30319.1...
Hi,
I want to display a child window that contains a combobox with several values coming from one of the child window's property:
public partial class MyChildWindow : ChildWindow
{
private ObservableCollection<MyClass> _collectionToBind = // initialize and add items to collection to make sure it s not empty...
public Observabl...
Working on a WPF application, I started working on a custom ControlTemplate. I reached the point where I need to change some control properties when an event occurs.
For this purpose, there are Setter elements. Seems all good, but I cannot use them inside EventTrigger elements. For example, if a simple Trigger, that can be bound to cont...
I'm looking for a way to bind xaml images dynamically in code.
There are lots of examples online to show how to bind png or xaml images in the window's xaml, or to load png files in code.
But I have found no examples for xaml files with build action=page. XmlReader can't handle them since they are compiled to baml.
LoadComponent(new ...
I am struggling to work out how to use default namespaces with XmlDataProvider and XPath bindings.
There's an ugly answer using local-name <Binding XPath="*[local-name()='Name']" /> but that is not acceptable to the client who wants this XAML to be highly maintainable.
The fallback is to force them to use non-default namespaces in the ...
If I have a XAML window that I show with ShowDialog, is there a way to make it (not) appear in the taskbar?
The problem is that I can set the window to be topmost but if that window opens another dialog and I set that also to be topmost, I can put the second behind the first by clicking in the taskbar. This tends to confuse users.
...
I am using Silverlight 4.0
What is happening is that the ScrollViewer will only scroll when one hovers over controls like textbox, treeviews, etc.
If the mouse is over non control objects (like grids) then the mousewheel scrolling doesn't work.
Is this normal behavior?
...
I have the following idea: when the user clicks on the more... button of a grid row, the row must expand into a detailed state that shows additional details for the current entry. I know that xamwebgrid provides an expand command, but isn't it just for hierarchical data purposes? How can I display some movie screenshots let's say, only i...
Hello,
I have a wpf column series chart and I have more than 15 columns. I want the horizontal scroll to show up. And i am not able to.
Any help.
...
Hi,
I'm looking to create a WPF textbox control that acts similar to the email recipient textboxes in Outlook (the To, Cc and Bcc inputs). I don't necessarily care that much about auto-completion (i've found millions of examples for that), but what I'm really struggling with is how to have delimited text entries in the textbox behave as...
Pretty much I have an Editable Combobox and I want to add a button to the right of the drop down button which clears the selected item. So...
|TextBox |X|v|
I was thinking something like...
<Style...>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<ControlTemplate.Resources>
...
Hi,
I have quite a tricky problem:
I am using a ListView control with the ItemsSource set to a CollectionViewSource including a PropertyGroupDescription to group the ListView elements. The CollectionViewSource looks like this:
<CollectionViewSource x:Key="ListViewObjects">
<CollectionViewSource.Source>
<Binding Path="CurrentL...
Hi Stackoverflow!
I'm currently building a Surface application where the main navigation is a circular menu. For each menu item I'm using a custom control that I found on codeproject.com:
http://www.codeproject.com/KB/WPF/PieChartDataBinding.aspx (PiePiece control)
The number of submenu items (which is also piepiece controls) comes fr...
Hi,
I am looking for a simple solution to the following problem:
I am using a simple TextBox control with the Text property bound to a property in the code behind. Additionally I am using a validation rule to notify the user of malformed input.
... error display style h...
I have an extremely simple IMultiValueConverter that simply OR's two values. In the example below, I want to invert the first value using an equally simple boolean inverter.
<MultiBinding Converter="{StaticResource multiBoolToVis}">
<Binding Path="ConditionA" Converter="{StaticResource boolInverter}"/>
<Binding Path="ConditionB"...
I have the following xaml in a template for a lookless control:
<Style x:Key="NumericUpDownStyle" TargetType="controls:NumericUpDown">
<Style.Setters>
<Setter Property="Change" Value="{x:Static local:Preferences.ChangeAmount}"/>
</Style.Setters>
</Style>
Where the 'Change' property on the 'NumericUpDown' control is a d...