I've begun experimenting with dependency injection (in particular, MEF) for one of my projects, which has a number of different extensibility points. I'm starting to get a feel for what I can do with MEF, but I'd like to hear from others who have more experience with the technology. A few specific cases:
My main use case at the momen...
I have the following model
<MeshGeometry3D x:Key="SphereOR10GR13"
Positions="121.4130 33.9882 64.3701 85.0383 102.2932 168.1890 0.0000 0.0000 0.0000 68.8637 96.3488 159.4094 82.9020 105.2468 168.1890 36.2556 196.8622 64.3701 85.0383 138.7499 159.4094 148.6907 0.0000 23.3858 148.6907 260.7480 23.3858 89.4149 143.2779 1...
I'm working on a bigger project atm, but I made this simple example to show you what happens..
using System.Collections.Generic;
using System.Windows;
namespace txt
{
public partial class MainWindow
{
public MainWindow()
{
InitializeComponent();
}
private void Window_Loaded(object send...
I have a xaml code:
<Grid>
<WrapPanel>
<TextBox ></TextBox>
<Button Content="GetIt" />
</WrapPanel>
</Grid>
How i can to get all available space for textBox?
i want to do something like that:
|[__________][GetIt]|
...
It seems like there has to be a way to do this:
I am applying an ItemContainerStyle in my Listbox, based on two property triggers. As you can see, I'm using the exact same set of trigger enter/exit actions, simply applied on two different properties. Is there something equivalent to a <Trigger Property="prop1" OR Property="prop2"> ???...
Is there a posibility to scroll to a specific place in a ScrollViewer from your code behind?
So something like the Slider element you can change the value property...
...
Hello all,
'I want to bind the Height property of the RichTextBox to the Height Property of the GridView`s Row. How can I do that? I do not know how to get the Row's Height as I can not access the Row in xaml what I would like to do.
The Ancestor type should be GridViewHeaderRow , but I do not know its level...
EDIT:
<my:RadGridView ...
I have a listbox and its bound. and i have tooltip on listbox item sometihng like this
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<!--<EventSetter Event="MouseEnter" Handler="ListBox_MouseEnter" />-->
<!--<EventSetter Event="MouseEnter" Handler="ListBox_MouseLeave" />-->
<Setter Property...
Is it possible to continue the alteration styles in a gridview even when there are no items?
As you can see, after the last item, the pattern stops.
...
Hi,
I am trying to change the default style of a DataGridCell (within a WPF Toolkit DataGrid) when there is a validation error. The default is a red border. How can I put my own template?
Thanks.
...
We are starting to develop a new application and I'm searching for information/tips/guides on application architecture.
Application should:
read the data from an external (USB) device
send the data to the remote server (through internet)
receive the data from the remote server
perform a video call with to the calling (support) center
...
Why this works
<myToolTip:UserControl1>
<TextBlock Text="{Binding Path=TestString, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type myToolTip:UserControl1}}}"/>
</myToolTip:UserControl1>
BUT this does not
<myToolTip:UserControl1 x:Name="userControl">
<TextBlock Text="{Binding Path=TestString, ElementName=userCo...
I'm creating dynamic templated XAML designs that I would like to convert to PNG or GIF from my C# code.
Any ideas?
...
Hi,
I'm trying to Convert a Bitmap (SystemIcons.Question) to a BitmapImage so I can use it in a WPF Image control.
I have the following method to convert it to a BitmapSource, but it returns an InteropBitmapImage, now the problem is how to convert it to a BitmapImage. A direct cast does not seem to work.
Does anybody know how to do i...
I have some logic that depends upon two properties being set, as it executes when both properties have a value. For example:
private void DoCalc() {
if (string.IsNullOrEmpty(Property1) || string.IsNullOrEmpty(Property2))
return;
Property3 = Property1 + " " + Property2;
}
That code would need to be executed every time Property1...
I have a group of borders that make up a small map. Ideally I'd like to be able to bind the border's background property to a property in a custom list and when that property changes it changes the background. The tricky thing is, I have to do this in code behind. Could someone point me in the right direction?
Thanks.
...
I have a smart client (WPF) that makes calls to the server va services (WCF). The screen I am working on holds a list of objects that it loads when the constructor is called. I am able to add, edit and delete records in the list.
Typically what I am doing is after every add or delete I am reloading the entire model from the service aga...
So far my plan is to have an event "Item selected" which the property inspector listens to. The actual property inspector is just a ContentControl. When the object is selected the content property is set and the appropriate DataTemplate for editing the object is loaded.
In general I am trying to do this "MVVM" style. I guess you could u...
Data Layer
I have an Order class as an entity. This Order entity is my model object.
Order can be different types, let it be
A
B
C
D
Also Order class may have common properties like Name, Time of creation, etc.
Also based on the order type there are different fields that are not common.
View Layer
The view contains the followi...
I'm looking to make a 'dashboard' system that will place itself on the desktop, between icons and the wallpaper. I understand this will probably require API calls. Do you have any advice on how I can do this?
TIA.
...