Questions tagged [wpf-controls]

WPF controls include UserControls, which are composite collections of other controls, and CustomControls, which are controls built with WPF styles and templates.

From Microsoft documentation:
Windows Presentation Foundation (WPF) ships with many of the common UI components that are used in almost every Windows application, such as Button, Label, TextBox, Menu, and ListBox. Historically, these objects have been referred to as controls. While the WPF SDK continues to use the term "control" to loosely mean any class that represents a visible object in an application, it is important to note that a class does not need to inherit from the Control class to have a visible presence. Classes that inherit from the Control class (AKA "Custom Controls") contain a ControlTemplate, which allows the consumer of a control to radically change the control's appearance without having to create a new subclass.

5697 questions
2
votes
2 answers

How to set WPF default values for properties, if possible?

I am just starting WPF and it is frustrating the hell out of me. It seems that many properties are null by default (at least those I am working on at the moment) and hence when it compiles and run, nothing happens. Is there a quick way or a standard…
Jake
  • 11,273
  • 21
  • 90
  • 147
2
votes
1 answer

WPF Progress Bar in different colors

I am having a alarm status. I want to reflect the alarm status on the progress bar with the help of colors. If an operator has handled the alarm till 30% status, so Progress Bar will show the 30% color and if Operator has handled till 60%. So…
Maverick
  • 1,952
  • 4
  • 21
  • 33
2
votes
1 answer

How to Change the Animation Speed of a Windows.Controls (WPF) ProgressBar

I have a fairly short and indeterminate process which needs a quicker-than-standard animation speed. I couldn't find any likely properties, or even anything on the net. Anyone know? Thanks!
MrGreggles
  • 6,113
  • 9
  • 42
  • 48
2
votes
2 answers

WPF template for yes/no ToggleButton

Can anyone help me with a simple template to make a WPF ToggleButton show "yes" or "no" depending on it's toggle state? I dont want it to look like a button though, just a piece of text that either shows as yes or no. I'd like it as a template that…
Paul
  • 815
  • 1
  • 13
  • 23
2
votes
2 answers

Using app-level resources in the Generic.xaml file of a custom control library

I have a button on a custom control and I'm trying to display an image on it which is defined as a resource in my App.xaml file like so:
StuartMorgan
  • 658
  • 5
  • 28
2
votes
1 answer

How can I add custom behavior for item in panel?

In my WPF project I need to have a panel with following behavior. When you click on an item it should go upper top item. I have several questions regarding this: 1. Should I create my custom Panel and add somehow animation in ArrangeOverride…
Leonid
  • 1,071
  • 2
  • 15
  • 27
2
votes
1 answer

Command Binding to Routed Event in WPF User-control

I want to bind Viewmodel command to Usercontrol's Routed Event. Here is the detailed explanation of what I have. I have a User Control which have one Image (which shows image) and one Button at bottom (Button to remove Image). I am using a…
Hardik
  • 1,716
  • 6
  • 27
  • 41
2
votes
4 answers

How to get a list of controls in a groupbox in WPF

In standard WinForms development I would do the following: foreach (Control in groupBox1.Controls) { MessageBox.Show(c.Name); } How does a guy do this in WPF? I have a Grid inside the GroupBox and a number of controls in the grid (buttons…
Douglas Anderson
  • 4,652
  • 10
  • 40
  • 49
2
votes
2 answers

How to programmatically set selection mark (focused item) in WPF ListView

I can't find the way to programmatically set focused item in WPF ListView. I can only find variations of Selected Item | Items | Index | Value, but 'Focused' item is not directly related to 'selected' item - focused item can be not-selected (e.g.…
Xtra Coder
  • 3,389
  • 4
  • 40
  • 59
2
votes
1 answer

Want to change the Cell background color in wpf datagrid

I am binding Rows with Classes. On each binding Row i want change the Cell back ground color on base of cell value.
ujjaval
  • 1,523
  • 4
  • 20
  • 35
2
votes
2 answers

How to change Selected Row Background Image in wpf DataGrid

I have DataGrid with the Following Code . In alter native row background have my Own Image . so is possible then also i want to change the Row Background Image on selected Row.
ujjaval
  • 1,523
  • 4
  • 20
  • 35
2
votes
1 answer

WPF Chart Toolkit - Change area series color's opacity

I need the area series charting to look like: I succeeded in hiding the two axis and changing the colors to gradient brush. I still need help on changing the opacity so the green one will be "behind" the orange one. Also - How do I change the little…
Tamar Cohen
  • 1,272
  • 2
  • 16
  • 28
2
votes
1 answer

WPF User Control in WinFORMS: Project Structuring

SCENARIO I decided to work on WPF technology for my new application. This application has to be called on Menu click from a WinForms window. So I created a WPF UserControl Library and integrate it to display in parent WinForms Form using Element…
angad.stjudes
  • 186
  • 1
  • 6
2
votes
2 answers

WPF: What is the correct way to format a dependencyproperty as string to display in a textblock?

This is a follow up based on the answer of a previous question. I've managed to come up with a DependencyProperty which will be updated using a Timer to always have the latest date time, and a textblock which shows the datetime. Since it's a…
black eyed pea
  • 427
  • 1
  • 7
  • 16
2
votes
3 answers

Access data from one Datagrid to another

I am developing a User Interface to view the student details from a student Database. I have three datagrids in my application as follows: The first datagrid at the left is for selecting the Student from the list and the other two must display the…
Indhi
  • 1,684
  • 5
  • 27
  • 48
1 2 3
99
100