Hi,
I have created an ObservableCollection in the code behind of a user control. It is created when the window loads:
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
Entities db = new Entities();
ObservableCollection<Image> _imageCollection =
new ObservableCollection<Image>();
...
Is it possible in WPF to define some menu structure and than use it in multiple contexts? For example I'd like to use a set of menu items from resources in ContextMenu, Window's menu and ToolBar (ToolBar with icons only, without headers). So items order, commands, icons, separators must be defined just once.
I look for something like th...
Hi,
I have a problem with a databinding in WPF.
When I try to use a value converter and set the NotifyOnTargetUpdated=True property to True, I get an XamlParseException with the following message:
'System.Windows.Data.BindingExpression'
value cannot be assigned to property
'Contenu' of object
'View.UserControls.ShadowedText'....
i want to hide button in wpf i used in widows form ex : button.visible=false what 's equivelant to that in wpf ??
thank in advance
...
Hi,
I'm writing a user control with a dependency property for a search text called SearchText. It is a dependency property because I want to allow consumers of the control to use data binding. The user control contains a WPF TextBox where the user can enter the search text.
I could use data binding to connect the SearchText dependency ...
Introduction
I have a ListView and want to format only the second column. The following XAML code does that:
<ListView x:Name="listview">
<ListView.View>
<GridView>
<GridViewColumn Header="Property" DisplayMemberBinding="{Binding Path=Key}" Width="100"/>
<!-- <GridViewColumn Header="Value" DisplayMem...
Hi,
I'm writing a piece of code that takes the records from a sql ce 3.5 database, creates images based on the url provided and then fill the observablecollection with those Images. It looks like this:
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
Entities db = new Entities();
ObservableCollection<Image> _...
Hi,
In Xaml I can set a custom attached property using
local:TestClass.TestProperty="1"
An I can bind to a custom attached property using
{Binding Path=(Namespace:[OwnerType].[PropertyName])}
{Binding Path=(local:TestClass.TestProperty)}
But how do I specify the namespace when I need to use a custom attached property in a SortDescript...
Hi guys
I need to be able to render a silverlight storyboard animation to video. The animated content itself could be simple UIElements, Images or even two or more videos playing at the same time.
Several ideas came to mind like RenderTargetBitmap on a single frame basis, but:
1) I've never tested this against video embedded content
...
can any one tell me how can we enable/ disable button by radio button in MVVM.
...
I am building an application which has multiple user entry screens. I would like to know if there are advantages/disadvantages of using wpf popups rather than modal windows?
I am using mvvm-light.
I have noticed that popups are being used extensively in touch applications (eg iPad).
...
I am defining a custom control in WPF which serves as the base class for multiple dialog windows which all leverage shared services (positioning, Ok and Cancel buttons). The custom control is defined as follows:
public class ESDialogControl : Window
{
static ESDialogControl()
{
DefaultStyleKeyProperty.OverrideMetadata(ty...
I'm working on a complex application, and I'm having an issue with a listbox not being bounded by the window height. Here's a simplified version of what it looks like. How would I get this listbox to correctly be bounded by the window? Right now, the bottom scroll button is off the screen and cannot be seen until the window is big enough...
I have a listbox bound to a list of objects for a data entry screen. The item template includes textblocks, a checkbox and comboboxes.
When the listbox is populated I would like to change the foreground color of the textblocks to red if object.value1 = true and object.value2 = 0.
Any ideas?
...
Hello,
I have a big problem.
I use additional controls for Wpf. One of them is Telerik RadWindow
This control is already templated.
Now I want to create custom Window with will inherit from RadWindow, and make custom template, eg. One base window will contains grid and two buttons, second base window will contain two grids (master - det...
I'm hoping for some insight from someone better experienced than I for creating a window/set of windows for displaying data in WPF. Here is a little overview of my task:
I will getting a large amount of binary output from a receiver. This will then be parsed and keyed to the meaning of the particular bit (i.e. word1 bit1 = Receiver St...
Hi all,
I want to change the direction of my marquee on changeDirection button click.
My code for changing direction is :
private void changeDirection_click(object sender, RoutedEventArgs e)
{
if (_marqueeType == MarqueeType.RightToLeft)
{
_marqueeType = MarqueeType.LeftToRight;
StartMarqu...
Hello,
I added a ValidateValueCallback to a DependencyProperty called A. Now in the validate callback, A shall be compared to the value of a DependencyProperty called B. But how to access the value of B in the static ValidateValueCallback method validateValue(object value)? Thanks for any hint!
Sample code:
class ValidateTest : Depend...
I am used to using converters that return a value per property, such as Foreground color.
Is it possible to have a converter that works with multiple properties?
such as: Foreground, Background, Font-Weight, Font-Size
How can I create one converter (or less than 4) that could set multiple properties?
...
I have a situation where I need to find the parent Window or WinForm which is hosting the WPF control. I need to get the handle of either the parent Window or WinForm whatever the case may be.
The problem is when the WPF control is hosted in a WinForm using ElementHost. How can I find the Handle of the hosting WinForm from a WPF control...