Embedding DirectX (.x files) in WPF application C#
Hi, I have DirectX .x files and I would like to display the model in WPF form. Any suggestions how to do so? Thanks, Ronny ...
Hi, I have DirectX .x files and I would like to display the model in WPF form. Any suggestions how to do so? Thanks, Ronny ...
I'm beginning with WPF and binding, but there are some strange behavior that I don't understand. Exemple 1 : A very simple WPF form, with only one combobox (name = C) and the following code in the constructor : public Window1() { InitializeComponent(); BindingClass ToBind = new BindingClass(); ToBind.My...
I've got a MyGrid.Children UIElementCollection, I would like to find all the Rectangles in it that have there styles set to StyleA, and set them to StyleB. I'd like to use LINQ if possible, so I can avoid a nasty nested loop. Something like this pseudocode: var Recs = from r in MyGrid.Children where r.Style == Styl...
This should be a very simple task, but for some reason I'm running into a lot of problems with it in WPF. This is what I want to happen: I have a bunch of controls in a window, including expander controls. I want to have scroll bars for that window, when content expands below the visible area. Also, the window is not of fixed width, it ...
I want to render a lot of circles or small graphics within either silverlight or wpf (around 1000-10000) as fast and as frequently as possible. If I have to go to DX or OGL, that's fine, but I'm wondering about doing this within either of those two frameworks first (read: it's OK if an answer is WPF-only or Silverlight-only). Also, if ...
I need to know a reliable way I can determine the folder that a windows service was started from. The way of determining this seems to be different than the way you'd determine it in a WPF applciaiton. More Details (optional reading): I have an embedded sql database that is used by both a WPF application and a windows service. During ...
Greetings, in my application i have a listbox with items. THe application is written in WPF. How to scroll automatically to the last added item? I want the scrollviewer to be moved to the end of the list when new item has been added. Is thare any event like "ItemsChanged"? (I don't want to use SelectionChanged event) ...
Hi All, I need to display a button depending on the value in the database. For Eg. If the value of the object is empty I need to display a button that says Create Data. And if the object does have a value, I need to display 2 buttons that say Update Data and Edit data. I tried to use 2 converters for this. The first one displays Create...
Problem: I store the page name I want opened in Silverlight in a database. When I startup the application I want to set the page to this string so rather than this: this.RootVisual = new MainPage(); I want something like this string pageName = getValueFromDatabase() if (!PageExists(pageName)) throw error else this.RootVisual =...
Hi, I was wondering if there is a standard way (or best-practices way) of transitioning between two views in WPF? For example, if you are looking at one particular view, and you click a button (e.g. a "Next" button) and you want to transition into the next view, what is the best-practices way of doing that? I have seen a few examples o...
Hi, I'm building a WPF application and this WPF application is having a toolbar-like panel that I use for adding button based on the context. The code of the toolbar is: <Grid x:Name="ToolBarGrid" VerticalAlignment="Top" Height="46"> <Grid.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> ...
When creating a custom IValueConverter for a user-editable field, the Convert implementation is usually fairly straightforward. The ConvertBack implementation is not, since (in the absence of an explicit validation rule) it has to cope with bad user input (eg. typing "hi" in a numeric input field). If an error occurs during conversion,...
This other SO question asks about an autocomplete textbox in WPF. Several people have built these, and one of the answers given there suggests this codeproject article. But I've not found any WPF Autocomplete Textbox that compares with the WinForms autocomplete textbox. The codeproject sample works, sort of, ... ...but it isn't s...
OK, so I need to create an ICollectionView from an existing ICollectionView. The idea is that I can take whatever filters/grouping/sorting has been set on the existing view and then create other views from that "base" view, in effect "layering" or aggregating my filters, etc. I need the end view to update its items "auto-magically" wh...
I've created a simple subclass of StackPanel that I can move around on the screen using an animated TranslateTransform. It looks like this: public class MovingStackPanel : StackPanel { public void BeginMove(Point translatePosition) { RenderTransform = new TranslateTransform(); Duration d = new Duration(new TimeS...
I have a delegate function declared in the View (Window). The delegate function is executed in a other class. But when i run the application and I the delegate function gets called i get the following error: Exception types: System.invalidoperationException Exception sources: WindowBase Exception stack traces: System.W...
Hi, Ok. This is a tricky one: (for me at least) I have a datagrid. A column of the datagrid is a simple <DataGridTemplateColumn> with its CellTemplate containing a <DataTemplate> which contains a <ComboBox> <my:DataGrid Name="dataGridMain" AutoGenerateColumns="False"> <my:DataGrid.Columns> <my:DataGridTemplateColu...
Hello everyone, I have question on the checkbox. First of all, I have a usercontrol which has a list box like this and this user control will be switched by 2 button and then the data source is changed and then the the displayed officer status will be changed: When I check the checkbox, Officers[0].IsOnDuty will be changed to true. The...
I am playing with DxScene and VxScene: http://www.ksdev.com/dxscene/index.html It looks very nice and powerful: 3d accelerated vector graphics, cross plaform, nice effects, many 2d GUI controls (vector based), good scaling, transparency, rotating (x, y, z), 3d models, etc. Even with many effects, the CPU stays very low (0%)! http://www....
Hi all, I have custom control with some text in content template: <ControlTemplate TargetType="{x:Type local:TouchScreenKey}"> <TextBlock><ContentPresenter Content="{TemplateBinding Title, Converter={StaticResource CaseConverter}}" /></TextBlock> </ControlTemplate> and custom IValueConverter CaseConverter - with property Upper...