Hi,
so, I have templated combobox that is basically acting as a simple colour palette. It is populated with a list of SolidColorBrush objects. Fine.
Now, I have some data that holds the hex value of the current colour. I have a converter that converts the hex into a SolidColorBrush. Also fine.
Now, I want to set the SelectedItem prop...
I have a user control in silverlight which contains both XMAL and .cs file.
But I wanna make it into a base control.
In other word,I can make a control inherited it whose area in it can be edited.
Just like Master Page in asp.net,you know.
In the base control,I only have a lot of description in XMAL,perhaps it can be described in the .c...
Hello,
I want to rotate a given 2D (!) Vector, is there a WPF built-in function for this?
Currently I'm doing it manually:
Vector v = new Vector();
v.X = 10; v.Y = 10;
Vector v2 = new Vector();
v2.X = v.X * Math.Cos(-90 * 180 / Math.PI) - v.Y * Math.Sin(-90 * 180 / Math.PI);
v2.Y = v.Y * Math.C...
I have implemented a Splash Screen according to WiredPrairie unmanaged c++ splasher class.
But not when my application loads, my window isn't activated. The user has to click on the login box even thought it is the only window open in my application.
I have tried the following but none of these work.
Topmost = true;
...
I'm working with VS2010, WPF and EF. I've placed controls on my window by dragging an entity out of the Data Sources toolwindow. I used the "details" setting so my entity is represented by several labels and textboxes. I've also added a button with the following code:
_context.SaveChanges();
When I'm editing data, the changes in wh...
Hi there,
I´ve got a problem with a Combobox in a ListView.
I´ve got a class called "Substrate". This class contains an object of a class called "SubstrateType". I want to show the objects of the class "Substrate" in a Listview. Each property of the "Substrate" is presented in the columns of the Listview. For the different "SubstrateTyp...
I'm working on an application for a client, and one of the requirements is the ability to make appointments, and display the current week's appointments in a visual format, much like in Google Calendar's or Microsoft Office. I found a great (3 part) article on codeproject, in which he builds a "RangePanel", and composes one for each "pe...
How can i solve the following (simplified) problem?
M-V-VM context. I want to show text at the UI.
In case the user has the rights to change the text, i want to use a textbox to manipulate the text.
In case the user has no rights, i want to use a label to only show the text.
My main problem: how to exchange textbox and label and bind Te...
Setup:
I have a combo-box, it's itemsource bound to an ObservableCollection<T> of a custom class, one property is a List<myenum>.
I have an itemscontrol which is databound to the combo-box's selected item List<myenum> property.
The itemscontrol datatemplate creates a list of radiobuttons, each representing the individual enum values i...
What's the best way to convert a simple console application to a WPF? and I am a COMPLETE newb so be gentle!!
The console app displays information according to user choices.. real simple stuff, but I'd like to create a GUI for it in WPF.. and am looking for initial steps on how to go about it.
...
I can find only MouseDown Event and MouseUp Event on a image in WPF.
This causes some problem if I do MouseDown on some Image, Move the mouse and MouseUp event happens on some other image.
Is there any other event that I can use to solve this problem. like MouseClick Event for Button element.
...
Hi,
I'm wondering if there is a way to convert this so it would be more performant
by using a Parallel.For for example.
public FrameworkElement FindIntersectingElement(Rect rectangle, UIElement activeElement)
{
foreach (var child in this.Children)
{
if (child != activeElement)
{
if (GetBounds(chi...
I have a person class with two properties, Name an Age. I know how to use databinding to display a collection of person in a wpf list box and how to modify the listitemtemplate to customize how each person is displayed.
Now I'd like to number each person on the list according to the order they appear on the list (which could change as t...
I am trying to increase the size of the image by 20. So I am using ScaleTransform as shown below.. but the following code doesn't do any scale Tranform.. Any help would be appreciated...
<Grid>
<Canvas>
<Canvas Height="50" Width="50" Canvas.Top="10" Canvas.Left="100"
Visibility="Visible">
<Image Name="Img" So...
I have a wpf gui which displays a list of information in separate window and in a separate thread from the main application. As the user performs actions in the main window the side window is updated. (For example if you clicked page down in the main window a listbox in the side window would page down).
Right now the architecture for th...
<ItemsControl Margin="0,16" ItemsSource="{Binding}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Ma...
Hi,
I have a tree view defined as follows:
<HierarchicalDataTemplate x:Key="ChildTemplate"
ItemsSource="{Binding Children}">
<TextBlock Text="{Binding TagName, Mode=OneWay}"/>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate x:Key="NavigationHeaderTemplate"
ItemsSource="{Bind...
I am using the ObservableSortedDictionary from Dr. WPF.
The constructor looks like this:
public ObservableSortedDictionary(IComparer<DictionaryEntry> comparer)
I am really struggling to create an implementation that satisfies the constructor and works.
My current code (that won't compile) is:
public class TimeCreatedComparer<T> : I...
I have a class CustomCollection : IList which maintains a list of CustomObject Types.
This is what I tried, but it's not working (provider.Data is readonly):
CustomCollection collection1 = somesampledata;
ObjectDataProvider provider = new ObjectDataProvider();
provider.ObjectType = typeof(CustomObject);
provider.Data = collection1;
//...
I am building a WPF application using C# 3.5
I have a WPF menu on the top of the application.
When clicking on a top level menu item, i need the second level of the menu to show horizontally instead of vertically "and" remain opened ( not disappear like a normal menu).
What I need to have is something similar to the following screen sh...