If I create a binding to the IsReadOnly property of the DataGridTextColumn, it does not actualize. If I set it through markup, it works.
<DataGridTextColumn IsReadOnly="{Binding IsReferenceInactive}"/> <!-- NOP -->
<DataGridTextColumn IsReadOnly="True"/> <!-- Works as expected, cell is r/o -->
The IsReferenceInactive property is a ...
Hello,
I need to host a FlowDocument inside a Window / Grid or in other words I don't want the Flowdocument to be the root element. Can somebody please help me how this can be done? I only found informations on how to host UIElements inside a FlowDocument, but not how to place the FlowDocument inside something else. Thanks for any hint!...
I am trying to create a custom style panel (StyledStackPanel) which is identical to regular StackPanel, that has a custom style.
For example - if the style is simply to add an underline, by writing:
<StyledStackPanel>
<!--User content goes here-->
</StyledStackPanel>
I would like to receive the same appearance as if I wrote:
<Sta...
Hi,
I have a requirement to generate a "report" in WPF which is simply a grid.
However, the columns and the styling rules (e.g. "Red if value below zero") for this grid are unknown at compile time.
There are hundreds of questions like this and I must have read over half of them but I cannot find a solution to this requirement which wo...
Hello,
I am constructing my app infra structure, and finding it hard to achieve a very basic behavior - I want to raise events from different user controls in the system and being able to catch those events on some other user controls that listens to them. For example i have a user control that implements a TreeView. I have another user ...
Hi
I am developing a game with WPF technology.
I want to add new Features to game every third days .
the size of update is important for me.
my game needs to internet for start. like an online game.
another challenge is size of updates.
the most important note :
I need to update of the program does not needing stop.
what is your suggest...
I am working on an outlook addin where we are using WPF user control embedded in a Windows form using ElementHost.
This app crashes on only few machines intermittently.After analyzing crash dump,the WPF rendering thread seems to be causing this crash.The stack trace in the windbg looks like
FAULTING_IP:
msvcr80!memcpy+5a
7814500a...
At the moment I am creating new instance of both View and ViewModel and assign view.DataContext = vm in the application in the handler of 'Startup' application event
In the http://msdn.microsoft.com/en-us/magazine/dd419663.aspx in the "Applying a View to a ViewModel" chapter I've read that it would be a good idea to bind ViewModel objec...
Is there something close to Html.EditorForModel() for WPF?
ex:
<StackPanel><local:EditorControl<Student> /> </StackPanel>
or Html.TextBoxFor(model => model.Description)
What are the best practices for rapid development of data driven applications using WPF?
...
I have a render-heavy item template in an ItemsControl and want to minimize the recreation of child item templates when ItemsSource signals a change. I am wondering if, because ObservableCollection can tell WPF precisely what has changed (as opposed to just the whole list), if it is more efficient in rendering changes to the collection, ...
I have the following class Person:
public class Person
{
public string Name
{
get { return name; }
set { name = value; }
}
public string Nickname
{
get { return nickname; }
set { nickname = value; }
}
private string nickname;
private string name;
p...
I have a TextBox with a height=15 and width=50. I want the textbox to grow when the text size exceeds 50. I want to achieve this without using Width="Auto". Is there any way to achieve this? I tried TextWrapping = TextWrapping.Wrap without any success.
Appreciate your help!!
...
I am able to use WinForms controls, but not an entire form:
var foo = new DockableContent();
foo.Title = "Foo";
foo.Name = "FooName";
var c = new WindowsAppFramework.RenderTargetUserControl();
c.Dock = System.Windows.Forms.DockStyle.Fill;
c.AutomaticUpdateFPS = 60;
var host = ne...
Hi All,
I want to create listbox dynamically [codebehind c#]. Its datasource is class object.
class sample
{
string filepath;
string id;
string trackName;
}
Needs:
Display trackName as listbox item in the listbox [dynamically].
Code:
sample samp=GetBL.GetValue();
ListBox lbTrack = new ListBox();
StackPanel sp = new StackPa...
Whenever a node is selected in my treeview, it automatically does a horizontal scroll to that item. Is there a way to disable this?
...
I'm not sure if this is possible, but basically I have two degrees that will change the width/size and skew of an image. In a tranformation matrix (<Matrix3DProjection/>), it works like this:
M11:cos(x) M12:sin(y)*sin(x) M11:0
M21:0 M22:cos(y) M23:0
M31:0 M32:0 M33:1
So if I have X = 30° and ...
Hi,
I have multiple viewModels in my application and am binding/used them in ViewModelLocator mvvm light. I have done button on one of my DailyActivities.xaml page. but when i clicked on it,it gives me error in ViewModelLocator like "Object reference not set to an instance of an object". and control comes to this line :
public static v...
Hej
I am trying to load an (embedded) image in a wpf application, using an Uri but I keep getting an exception.
The code is:
new BitmapImage(new Uri("pack://application:,,,,/Icons/m.png"));
(In case it isn't clear, I am trying to load the m.png file from the Icons folder, which
has been marked as an embedded ressource).
and the exc...
Hi, I am starting to work with images in WPF and I am using the next pice of code ...
...
How can i add different items with either background/foreground color different in WPF listbox?
...