Windows Presentation Foundation, or WPF, is a subsystem for rendering user interfaces in Windows-based applications.
0
votes
0answers
4 views
Can I bind a UserControl to an instance of a class with a converter from className to UserControl-Instance
I have asked the same question in a perhaps not so comprehandable way and try again.
In my ModelView I have a lot of classes with two corresponding UserControls for each class. The names of the ...
0
votes
1answer
9 views
How do i call my CRUD method as a list in xaml.cs
This is my code in the class file , how do i call this in my xaml.cs ( code behind ) ?
//Get all records based on ActivityID and TaskID and Group By ActivityID , TaskID , QuestionNo.
public ...
0
votes
1answer
6 views
Children Tabs in Wpf
I have been looking for a way to implement a child tab control inside a tab control(sort of like multi level tab controls).
but haven't found any materials for that, i can implement dynamically that ...
0
votes
4answers
51 views
C# for loop comparing next value with current value
i have this piece of code here , basically i am doing a for loop as i retrieve records from database( using entity framework ) but when i want to compare using if statement theres an error :
...
0
votes
0answers
14 views
WPF create visual programming editor
I have seen this project called blockly.
It allows the user to perform programming tasks by using the mouse (a feature that I intend to implement in my application).
Are there any libraries such as ...
0
votes
0answers
7 views
Adding an object instance to a CompositeCollection as an item
Is there a way to add a single item to the CompositeCollection (used as source for ComboBox) in addition to other sub-collections?
The object instance of the item is a Property on the ViewModel
...
0
votes
0answers
10 views
datagrid add a double Horizontal Grid Lines Brush
I have a DataGrid that that gets built by c# code and i am trying to add double Horizontal Grid Lines Brush to the "Description" column. Can someone tell me how to add the double Horizontal Grid Lines ...
0
votes
0answers
4 views
Populating telerik RadGrifView using store Procedure in WPF
I have a RadGridView which populates data. I have no issues in doing this
Once the data is populated user can extend the row to see the Details grid (whic is a user control).
My Question is
How to ...
0
votes
1answer
14 views
how to set keyboard tab selection to a particular control in WPF
I have two text boxes and two buttons...I had written some logic in first text box Lost Focus event.As soon as i click the keyboard tab cursor will blink at second text box..Now i want to select the ...
0
votes
0answers
9 views
Way to access cell (not cell content) in a WPF DataGrid?
I know there is a lot of discussion about access the data in a DataGrid, but my question is can you access the cell itself. I feel like there MUST be a simpler way to change the data, selection, etc. ...
0
votes
0answers
6 views
WPF C# Mouse Dragging , Clone of element dragged
Here are my codes :
Label tb1 = new Label();
tb1.Content = qhm.Answer;
tb1.FontWeight = FontWeights.Bold;
tb1.FontSize = 24;
...
0
votes
1answer
30 views
WPF C# Foreach getting next value
I got a list of records from database that i have retrieve like this in my CRUD class ( i am using entity framework and Model.question is my class which have CRUD codes in it):
public ...
0
votes
0answers
11 views
Align multiple nested expanders
I have a hierarchical data structure and want to display it using nested expanders (with right expand direction).
The problem is that I want to align the latest expanders. The problem here are the ...
0
votes
0answers
12 views
Make a Frozen Column look like a separate DataGrid
I have a DataGrid that i have frozen the first column. I am trying to to make the frozen column look like a separate DataGrid. I want to increase the grid line after the frozen column to look like the ...
0
votes
0answers
30 views
WPF initialization issue
I have a class MyWindow which inherits from Window. Within MyWindow, I have the following method to execute once my OK button is clicked:
private void OKButton_Click(object sender, RoutedEventArgs e)
...
0
votes
0answers
4 views
Dynamically populate GraphSource through PopulateGraphSource method - RadDiagram
I am facing an issue where my graph is tree layout and looks fine initially. However, if I choose to change GraphSource upon user input/ clicks using PopulateGraphSource like in the OrgChart example, ...
0
votes
1answer
6 views
Datagrid bound list not being updated visually from Popup Window event wpf
This seems like a simple problem, but I can't figure out how to fix it.
I had a datagrid in wpf bound to a command that deleted everything in the datagrid. The command updated both in the data and ...
0
votes
1answer
32 views
How do I make custom XAML and CS partial classes with inheritance?
I have researched this pretty thoroughly and found this, this, and this. All of the help pages that I've found say pretty much the same thing. It's not very complicated, so I'm pretty sure I've done ...
0
votes
0answers
11 views
Hierarchical Data Template does not work in designer for my class?
I am trying to create a treeview to display my data. It will have 'CategoryData' objects at the top level which will have 'TypeData' objects below them. I have set up the following pretty simple ...
0
votes
1answer
25 views
Moving object (pushpin) on map
I am reading a file of moving objects an put them in a dictionary (validMovingObjects). I represent each object as a pushpin on the map (baseMap). When an object changes its location (latitude or ...
0
votes
1answer
13 views
TextBox Text Formatting From Style
I have a MainWindow.XAML
TextBox is added to it
TextBox text binding is done
When I add StringFormat inside binding (in MainWindow.XAML) it works
When I add StringFormat inside Style, it's not ...
0
votes
0answers
15 views
Custom navigable combo box control
I am trying to build a custom combobox with forward and back buttons I am starting out and I am having trouble with being able to populate the combobox with generic lists.
so far I have this:
...
1
vote
0answers
14 views
Cell ControlTemplate binding to AttachedProperty binding to property of view model
Suppose I have a datagrid whose binded objects are of type ObjectVM:
Public Class ObjectVM
Implements INotifyPropertyChanged
Public Event PropertyChanged(sender As Object, e As ...
0
votes
0answers
10 views
How to track KeyboardFocus of WPF Textbox created in template
I am trying to get an accurate IsKeyboardFocused for a WPF textbox that is being created in a template. I tried attaching to GotFocus and LostFocus and LostKeyboardFocus, but the focus lost is not ...
0
votes
0answers
5 views
WPF Radio Buttons are not highlighted when navigating via Tab key in Windows Classic Theme
I have window 7 installed on my machine. I have radio button group of 3 radio buttons. I can select any of those button using keyboard tab key, so when I press tab key, other radio button get focus.
...
-1
votes
0answers
41 views
Compatability between .NET 4 Client and Windows XP
I have a compatibility problem. I have written a WPF application in C# using Visual Studio 2012.
I want it to be able to run on Windows XP (I have set target framework to 4.0 Client), but all I get ...
2
votes
0answers
33 views
Listview with scrolling background image
I am trying to create a ListView that looks like items sitting on a shelf. I am able to get the shelf background on the list view like so:
<ListView.Background>
<ImageBrush ...
1
vote
1answer
34 views
Is it possible to override a control's event handler globally?
I have about 3000 checkboxes that I would like to have their "PreviewMouseLeftButtonDown" event handled differently. Is it possible to override the default event handler for all checkboxes globally?
0
votes
0answers
15 views
Resharper - How to “move to resource” to different cultures?
I am using WPF, I noticed the function "move to resource" when I write a string at XAML.
All right, it works. But my application supports English and Portuguese languages.
How can I refactory to ...
0
votes
0answers
11 views
wpf localization enum from different languages
i want to fill a combobox from enum values by using Localized.resx and Localized.tr-TR.resx under RSP.Model for different languages. but it does not work. my enum:
public enum PlanPhase
{
...
0
votes
1answer
31 views
how to bind a grid with an object
I am an amateur to windows phone development and also new to wpf. I have a grid :
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" >
<Grid ...
0
votes
1answer
21 views
Wpf class does not inherit correctly
I downloaded the sample code from
http://www.cnblogs.com/Files/sheva/RibbonStyle2.zip
I added three key files into a new project without changing the files. They are NativeMethods.cs, ...
0
votes
0answers
18 views
Is it possible to make a screenshots of a UIElement built in code-behind and not shown?
I would like to know if it is possible to "screenshot" an element without showing it on screen.
For example, this StackPanel:
private void Button_Click(object sender, RoutedEventArgs e)
{
...
-5
votes
0answers
36 views
How can i create an accelerometer for animation? [on hold]
I have a simple storyboard with a double animation which has a easing function.
How can I create an accelerometer to printing current acceleration value of this animation?(real-time)
Thanks a lot
0
votes
0answers
24 views
How to determine if a WPF control has been disposed?
I'm in the process of re-writing a WinForms app in WPF and I've run into section of code that updates a textbox (from another thread). In a nutshell, the function that updates the textbox looks like ...
1
vote
1answer
14 views
Unable To Close Custom ContextMenu Window
Everything in my WPF program is generally custom. In this problem I have a custom menu button that acts kind of like the MS Office button from 2007. When clicked it brings down a context menu. My ...
0
votes
0answers
9 views
WPF window build dll COM VBA “Application instance in the same AppDomain”
I wrote a little COM-visible dll which can show a WPF window. I set my dll in a VBA script reference (excel -> VBA) and when I run first time everything is OK, after that the VBA sub is finished and I ...
0
votes
1answer
14 views
Applying DataTrigger To GridViewColumn
How can I apply a datatrigger to the following in a VS 2012 WPF app?
I have tried this: Error: Foreground is not accessible or recognized
<ListView.View>
...
1
vote
0answers
37 views
Getting an actual size of a StackPanel WPF
I'm adding dataGrids into a stackPanel, which is later used for printing. I'm using stackpanel's property ActualHeight to find out the space that each dataGrid takes, so I can determine what goes on ...
1
vote
1answer
21 views
WPF data template dynamic switching
I have a class that represents an asynchronous result. There will be an exposed boolean dependency property called "IsCalculating". If that value is true, I want the visualiser to show template A - ...
0
votes
0answers
16 views
using VisualState how do i change text color from white to black
I have a VisualState for selecting a DataGrid, but when I select the row it turns the Text from black to white. How can I set the text to black when selected instead of white? ...
0
votes
1answer
24 views
Set CornerRadius on button template
I want to have a Button that defines no CornerRadius and two others that do, how can I achieve this?
<Style TargetType="Button" x:Key="TabButton">
<Setter Property="Background" ...
0
votes
2answers
17 views
WPF window resizing and ActualWidth / ActualHeight values
in my WPF project I've created a Window that has a Frame; the Frame content is a Page, in which I have a Canvas in which i do some drawings.
I want that, resizing the Window, the Canvas size changes ...
0
votes
1answer
33 views
Binding to “global” ViewModel
I would like to have a an object that is seen from multiple views.
Each view has a Viewmodel.
Is it possible to have a "global" viewmodel with and object that I cand binding from all views of the ...
0
votes
0answers
28 views
Datagrid in WPF - Binding to a dictionary
I have an ObservableCollection<Measure> that I want to bind to a DataGrid.
Each time a Measure gets generated, my program checks to see if the Measure's name property has been seen before and ...
1
vote
0answers
27 views
WPF - bind cell style to nested object properties
I have a CellStyle that I want to apply to several columns. I'd like to set up the bindings inside the CellStyle definition, but in such a way that I can bind each column to a nested object of the ...
1
vote
1answer
24 views
Adding clr namespace to XAML declaration
I am trying to do something simple, just add a new namespace to my XAML in the window definition. My main class is MainWindow.xaml and is in the "WealthmarginAnalyser" namespace. All I need is to be ...
0
votes
1answer
24 views
WinRT - determine if an element is visible to the user
I need to autoplay a media file if the user scrolls it into the view.
I got something like this:
<ScrollViewer>
<ItemsControl ItemsSource="{Binding SelectedProduct.Entities}" ...
0
votes
1answer
16 views
Bound ContentControl not displaying
I have two ContentControls on a page that bind to the same StaticResource and one of them draws correctly an the other doesn't draw at all.
The resource is defined thus:
<Path x:Key="ArrowNorth"
...
-1
votes
0answers
18 views
Kinect Wpf drawing skeleton on Canvas
i'm learning how to programing the kinect from the book kinect for windows sdk programing guide, and I have a problem with the drawing whole skeleton. I'm looking for the steps described in book, ...