WPF and C#:
Problem:
1. How to Refresh Radgridview when i Insert,update and Delete Record in database anrecord.
2.when i am Insert or Update Record than in radgridview that row is selected.
i am useing sql server 2005.
i am use to set data source of radgridview like " radgridview1.ItemsSource = ds; " ==> ds is dataset.
i am b...
I have a requirement to change a very small part of the WPF ComboBox's template.
If I take a copy of the existing template for the Luna theme and make the change it all works fine initially. But if the user has a different theme, my ComboBox retains it's custom theme, (Which is obviously based on Luna) so looks out of place.
Is there a...
Hi,
I am writing a PRISM/MVVM/WPF application. It's a LOB application, so there are a lot of complicated rules. I've noticed the View Model is starting to get bloated. There are two main issues.
One is that to maintain MVVM, I'm doing a lot of things that feel hacky like adding a bunch of properties to my VM. The view binds to th...
Hi All,
Is it possible to set thickness property of SolidColorBrush. The reason I am asking is that I have a IValueConverter binding to Textbox Border BorderBrush property and I am dynamically setting the color of the textbox,
<Window x:Class="MyWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://...
I'm running into a dilemma. When I make the ScrollViewer the main content object of my window, scrolling behaves exactly like I want it to. You resize to make it smaller than the content and the window and scroll bars appear. The problem comes in when I want the to menu to be static and the rest of content to be scrollable. I want the sc...
I have used the marvelous example posted at:
http://www.codeproject.com/KB/WPF/WPFDataGridExamples.aspx
to bind a WPF datagrid to a datatable.
The source code below compiles fine; it even runs and displays the contents of the InfoWork datatable in the wpf datagrid. Hooray! But the WPF page with the datagrid will not display in the des...
I have a WPF app with a usercontrol that contains a HwndHost. The HwndHost is created as follows:
hwndHost = CreateWindowEx(0, "static", "",
WS_CHILD | WS_VISIBLE,
0, 0,
hostHeight, hostWidth,
hwndParent.Handle,
...
Hello,
I am trying to remap the input of a textbox. For example. If a user enters a N then I would like to change it to a 9. I thought it might be best to try and catch it in the PreviewKeyDown event although I will also need to process paste attempts (I can solve that bit I think).
Is PreviewKeyDown a good place to start? If so, h...
Hi
In my project I am using a ComboBox with my custom objects like Employees and using DisplayMemberPath="Description".
This all works perfectly as expected.
Because this application is targeted to be used with a touchscreen, I had to style the scrollbar and make it wider which meant that I had to create a new template for the ScrolVie...
While reskining GridView (ListView with more columns), I ran into a problem, that I couldn't change the color of the Highlighted row. I searched the internet and found out, that adding this can help.
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
Color="Transparent" />
<SolidColorBrush x:Key="{x:St...
I've been trying to figure out what is the appropriate way to render real-time data as a line graph in WPF. And by real-time I actually mean, data that is being collected from a USB device that generates data at a rate of approximately 40Hz. There are multiple (up to 7) streams of data that I'm reading at 40Hz in an asynchronous fashion....
I have a resource assembly with image files in it that are built using Resource or Content build action. This makes these files accessible using the Uris. However I cannot find the way to enumerate such resources.
If I set the build action to Embedded Resource it becomes possible to enumerate the files with the following code:
string[] ...
I have a treeview in a UI full of rounded corners, so I'd like the treeview to match. Is it possible in xaml to change the border of a treeview to have rounded corners?
I've thought about hiding the border and putting the treeview inside a rounded rectangle, but this loses real-estate and seems in-elegant.
Any ideas?
...
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
How is this url mapped to .NET namespaces? Can you give an example how to do the same thing for custom .NET classes/namespaces? Is it an attribute that has to be defined on the namespace itself?
Or is it a matter or using C# aliases as in?:
using alias = FullNamespace
...
I'm new to WPF and before I dive in solving a problem in completely the wrong way I was wondering if WPF is clever enough to handle something for me.
Imagine I have a collection containing objects. Each object is of the same known type and has two parameters. Name (a string) and Picked (a boolean).
The collection will be populated at ...
Which one is better from performance view user control or custom control?
Right now I am using user control and In a specific scenario, I am creating around 200(approx.) different instances of this control but it is bit slow while loading and I need to wait atlest 20-30 second to complete the operation. What should I do to increase the p...
hi!
In my gridview I need to aggregate subrows into each row, something like in p2p emule/amule application where you can do double click to each file you are downloading and then under it you can see the parts of the file from where you are downloading.
Is it possible in WPF?
Thanks.
...
I've got a UI with a fairly standard look and feel. It has a column of icons on the left side which when clicked open a different user control on the right side. Currently I'm using separate controls for the selection icons and the usercontrol containment. I'm having strange focus issues that I am tired of trying to mitigate and am wonde...
Are there any good practices to follow when designing a model/ViewModel to represent data in an app that will view/edit that data in multiple languages? Our top-level class--let's call it Course--contains several collection properties, say Books and TopicsCovered, which each might have a collection property among its data. What kind of...
What is the best way to get an event from a child or grandchild module up to the parent Shell?
For instance, if I have a view in a module that is actually 2 levels away from the Shell, and I have a Window behavior. Is the eventaggregator really the best way to do this? it seems like overkill. I just want my MainShell to watch for a cha...