c# & wpf

  1. W

    Resolved How can I change the way, an item of a comboBox is presented as a string?

    Hello, as mentioned in the title, I want to display an item of a comboBox in a textblock as a string. On the first image below you can see how it is currently displayed. The item of the comboBox is called "vegetarisch" and thats also what should only be displayed in the textblock. Thats the...
  2. W

    Question How do I change the style of a checkbox?

    Hello, i have a quick question. How do I change the style of the tick inside a checkbox? Link to an image of my program: checkbox (Can't upload it here)
  3. W

    Resolved WPF How do I share data from one window with another window?

    I created a MainMenu window with three buttons called "Start", "Settings" and "Exit". When you click on Settings, the MainWindow closes and a new Settings window opens up. In the Settings window there are radiobuttons to choose the difficulty and a "save & exit" button. Now I need to transfer...
  4. M

    Button Command binding to the component in ItemsControl

    Hello, I have problem because I have no idea how to bind Command to the button which is inside ToDo Task component. Here is a code example <Grid Background="#FF333333"> <Grid.RowDefinitions> <RowDefinition Height="50"/> <RowDefinition Height="50"/>...
  5. M

    Question How to get full property updated with the contains of a TextBox

    I tried to integrate an example I found on the internet with my application but it doesn't work. Basically. my GUI contains a TextBox where the user can enter a value between 0 and 1. My goal is to check that the entered value is in the range [0,1] and also to have the property DiceThreshold...
  6. SAE

    Question how to call the event of window1 to window 2 in WPF

    The Idea is that when I start the application 2 windows pop up. On mainwindow I have button and on window1 I have label and when I press the button the label color should change. This is what Far have tried so far but it didn't work. What am I doing wrong ? and how to make it work ? Note: in...
  7. SAE

    Question How to make this work if the button and label are in different window

    The Idea is that when I start the application 2 windows pop up. On mainwindow I have button and on window1 I have label and when I press the button the label color should change. This is what Far have tried so far but it didn't work. What am I doing wrong ? and how to make it work ? Note: in...
  8. M

    ListBox cascade

    I am working with patient data in a hospital. A patient can have multiple CT scans. Every CT scan may have several linked structure-sets Every structure-set contains several structures. I managed to display a list of structure names directly from a PostgreSQL table. The next step is to...
  9. DanielBA

    WPF Tweening Rectangle not working

    I have made a custom wpf Control and I have been trying to create a method of Position Tweening to it. I have followed the Microsoft Docs explanations but to no avail. Can someone tell me why does this code don`t work? NameScope.SetNameScope(_Rectangle, new NameScope()); RectAnimation a = new...
  10. B

    How do I combine two signals on one XY plot?

    The .xaml code: <Grid Grid.Row="0" Grid.Column="0"> <Canvas x:Name="gCanvasPlot0" Width="500" Height="150" ... /> </Grid> <Grid Grid.Row="1" Grid.Column="0"> <Canvas x:Name="gCanvasPlot1" Width="500" Height="150" ... /> </Grid> The .cs code: //------------------------------ ...
  11. S

    I cann't find the error. The first two usercontrol view with combobox is ok, but not the last two.

    Hi, I'm doing my project and I have now in several hours looked at it but cann't finde the error. I have 2 views 1 view is normal mode, where there is a combobox where it should be updated when choosing the tabItem is chosen. 2. View is new (creating a new item). Here is also a combobox with...
  12. S

    Wpf Cann't get into the SelectionChanged event for at tabControl

    Hi I have the following TabControl with TabItems. I need to make som code when the Selection changes to another tab. First time I run the app I am going into the SelectionChanged. But then when choosing a new tab nothing happens at all. I want to go into the code each time, I hit the tabs. What...
  13. destro

    Resolved How can I notify source property about the changes made in Wpf DataGrid?

    I have a Datagrid bound to Datatable through Dependency property. I am unable to retrieve changes I make in datagrid even when I have set binding mode as two way. What are the best possible ways to update changes back to Source DataTable when dataGrid is edited? I know I can use...
  14. dj45-sys

    SAPI does not implement phonetic alphabet selection.

    Hey, Coders Programming my virtual assistant I have encountered this error - SAPI does not implement phonetic alphabet selection. I have reviewed the solution in forums and I have found that I have to add this line of code gb.Culture = new System.Globalization.CultureInfo("es-ES"); I have...
  15. J

    MVVM ICommand explanation ...

    Hi, here is my short code in MS VS 2019 C# WPF - MVVM, can someone please explain me: 1/ where is pointed my code to after "return _SaveCommand;" which is placed to "public ICommand SaveCommand" property ? It is classic MVVM. 2/ And who is caller of "CommandManager.RequerySuggested += value;"...
  16. S

    Query to find a single object from a single row

    Hi, I have problems to find the correct syntax to get a single result of a single row. I get the row (categories) and I can see in this row there is a CategoryIsObsolete field (it is that value I want) But when making af FirstOrDefault query the Category result is null - and I do not know why...
  17. redexception

    Create a new window in WPF

    Hi, I've created a SQL Loginsystem (doesn't matter, but okay ^^). When someone clicks on the register function, a new window should appear. But how do I do that ? And how can I edit this window ? Would there appear another window.xaml? Greetings from the US.
  18. R

    Issue with DatePicker needed to be used twice with DataGrid.BeginEdit

    This is a WPF application, using a Data Grid with Date Picker. The goal is to click on the calendar, select a date, then the Data Grid goes in edit mode so as soon as I click on another cell, the Update is done on the database and the row is added on the grid, that part is working. But, when I...
  19. me123123123

    For loop: open window, wait until it is closed, then progress to the next step in the for loop

    I am working with RelayCommands and a MessageBus. I want to write a learning program. I have three windows: 1. Learning Tab -> Here I choose which List of Cards I want to learn and here I think I should write the for loop 2. Question -> The first question of the list of cards I gave to the for...
  20. A

    Question Naming and Saving Child Windows

    Hi, I am studying C#/WPF. I am trying to create child windows upon click event as follows private void NewWindow(object sender, RoutedEventArgs e) { Window newWindow = new Window(); newWindow.Owner = this; newWindow.Title = "Window 1"...
Top Bottom