I am making a WPF Application where in i have a datagrid inside a treeview. Now....When i right-click on an item in this grid, i get a context menu with a Rename option. On this, I need to write a Rename logic. I want to do just like we rename folders in windows. How can i go about it? Please give me a simple solution as I am not a pro l...
I have a web service which provides an interface to query data. I am writing a WPF application using MVVM. I am working on creating a repository that my View Models can use to retrieve models. The repository will call the Web service to fetch data, when required.
I would require various Find methods in my repository that finds the data ...
I have a listview (in extended selection mode and synchronized with the current item) and a textbox. The textbox allows the user to input search criteria. On the TextChanged event of the listbox I match the search criteria to the names of listviewitems in the listview and set the selectedindex accordingly. This is to both highlight it an...
Hi!
In WPF it's better to create a property "complex" (i.e. of type "Visibility") or a property simple (i.e. of type boolean) and then using a converter to bind the property? The first way is shorter to write, but I don't know what is better about the performances.
Thank you!
Pileggi
...
Hi All,
I am binding dataview to listbox. How to get the selected item.
Geetha
...
I want to set the CommandTarget of the MenuItem of ContextMenu, in a Style, to the Style target, i.e., the control on which the style applies.
<Style x:Key="AAA" TargetType="{x:Type BBB}">
<Setter Property="ContextMenu">
<Setter.Value>
<ContextMenu>
<MenuItem Command="{x:Static CCC...
hello
i have a problem guys i want to get the row detail when i click that row on my listview i know it how it perform in window form but it is different in WPF /i m using C# wpf please help me out
thanks in Advance
shashank
...
Trying to create my own custom AttachedProperty for a WPF DependencyObject failed to actually do what I wanted it to do, and I am a bit worried that I (again) did not understand a WPF concept fully.
I made a very simple test class to show where my problem lies. From the MSDN Documentation, I copied
public class TestBox : TextBox
{
...
Hello,
I'm planning to use thw WebBrowser component to display html that is created on the fly. The perfect choice for this is NavigateToString or NavigateToStream methods. There's only one single problem - I need to load images / css styles / js files too. How do I accomplish this while using string/stream?
As an option I'm also consid...
Hi guys,
I have a WPF application which uses a (currently) local database to act as a binding source. Using the Visual Studio 2010 tools I have a LINQ-SQL model which acts as the Datacontext for most forms.
What I have is a UserControl with a TextBox and Datagrid. The datagrid ItemSource is set upon the UserControl.Loaded event with a ...
I have a UserControl that I want to participate in data binding. I've set up the dependency properties in the user control, but can't get it work.
The uc displays the correct text when I call it with static text (e.g BlueText="ABC") . When i try to bind it to a local public property, it is always blank.
<src:BlueTextBox BlueText="Feel...
How can I disable dropping of files on a System.Windows.Controls.WebBrowser? From the documentation it would seem that this behaviour should be disabled by default as it is inherited from the UIElement.AllowDrop Property.
However dy default I can drag and drop files on to a WebBrowser control. Further to this it seems I can't disable th...
Hi everyone,
I have a listview and want to have 2 context menus for it: 1) when right-click on an item (called Menu 1) and 2) when right-click on elsewhere spaces except the items (called Menu 2). There are sub set of menu-items shared between the two - let's call this CommonMenu. My test application is store here.
My problem is: when t...
Hello,
In the application I'm building, the user may perform something in one view (backed by a view model) that should trigger an action in one or more other view models. Each of these other vms needs the ability to veto (a.k.a. cancel) the action performed in the first v/vm pair.
Example:
User clicks on an account in a DataGrid co...
I have raw binary data received from device. I would like to display that data something like HEX editors do - display hex values, but also display corresponding characters.
I found fonts that have characters for ASCII codes 0 - 32, but I cannot get them to show on screen.
I tried this with WPF listbox, itemscontrol and textbox.
Is...
This is a nice-to-have for our designer. She has a layout where a form title, on the top right of the form banner, is two words in English. There are several forms so the words are a little different each time. So the effect is something like:
| firstword|
| form|
There is a fancy swoopy thing underneath this and some other...
I am using the Model-View-ViewModel architecture in a WPF application I am building, and I would like a specific ViewModel to actually be reactive to the size of the view (not a normal use-case of the MVVM approach, I know).
Essentially, I have a ScrollViewer object and I want the viewmodel to observe the width and height of the scrollv...
I recently discovered that some functionality has been changed drastically in the DataGrid since it made it into the general 4.0 framework (Using BindingGroups for one).
Can anyone point me at a list of changes (breaking or non-breaking)?
...
Hi,
I'm trying to add some validation rules to 2 PasswordBoxes. Both must have more than 5 characters and, both passwords must match. I'm not currently using MVVM.
I figure I could check the password on the PasswordChanged event but I can't get the Invalid state to toggle on the boxes.
Does anyone have examples of something like th...
I would like to be able to name a BackgroundWorker to make it easier to debug. Is this possible?
...