Search results for query: *

  1. M

    Question How to convert an Action into a Func that returns a value

    I tried your suggestion but the compiler is complaining on "orThrow" usage inside the Action block Action<bool> orThrow = result => { Debug.WriteLine(result); OrThrow(engine.loginToGrid(UserName, Password, GRID_IP, GRID_PORT...
  2. M

    Question How to convert an Action into a Func that returns a value

    I am using the following statements, provided by Varian, to connect to the Velocity Engine and consequently be able to use the Velocity API library Action<bool> orThrow = result => OrThrow(result, engine); orThrow(engine.loginToGrid(UserName, Password, GRID_IP...
  3. 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...
  4. M

    Question Are INotifyPropertyChanged and ValidationRule compatible?

    Yes. I tried adding "Mode=TwoWay" in the Binding Path. The compiler accepts but at runtime the data-validation procedure becomes ineffective. I can type in the TextBox-Text field whatever I want without any data validation reaction. That is why I was thinking of using INotiFyPropertyChanged for...
  5. M

    Question Are INotifyPropertyChanged and ValidationRule compatible?

    In my GUI I have a TextBox whose content can be edited at any time by the user and must be known in the code that has to use its latest value. The TextBox is already bound to the procedure that checks its content is in the proper range: <Window.Resources> <local:DoubleRangeRule...
  6. M

    Question Changing the Background color of some ListBox Items

    Do you mean to dynamically build the ListBox with C# code? I am afraid I do not have the experience and the knowledge it takes. I have thought of a workaround. After all, I have been asked to do something to help users focus on reviewing only the structure names that have been guessed through...
  7. M

    Question Changing the Background color of some ListBox Items

    The ListBox is defined as follows: <ListBox x:Name="EditableStructs" Grid.Row="5" Grid.Column="1" Margin="930,62,0,40" SelectionMode="Single" Grid.ColumnSpan="2" Background="PowderBlue" Height="500" ScrollViewer.VerticalScrollBarVisibility="Visible"...
  8. M

    How to draw the user's attention only to some items of a ListBox

    The indexes of the ListBox items, whose background colour has to be changed, are known at runtime. Since the length of the ListBox is also established at runtime I think I cannot use indexes to reach the single ListBox items before it is dynamically generated. The colour-changing process will...
  9. M

    How to draw the user's attention only to some items of a ListBox

    The first obstacle is how to identify the ListBox items whose background color has to be changed. Each ListBox item is a TextBlock. I can bind the Background property of the TextBlock to a brush color defined in the code-behind. However, only a few ListBox items (TextBlocks) have to display a...
  10. M

    How to draw the user's attention only to some items of a ListBox

    Thank you. I was thinking of that while I was in the shower. I was about to ask you if this would be possible. I will read the documentation you sent. I believe I will be able to change the background colour of some items from the code behind at runtime.
  11. M

    How to draw the user's attention only to some items of a ListBox

    OK. However, the difficulty I face is changing the background colour only of the ListBox items that show guessed structure names through the Dice coefficient. You know how the editable ListBox is populated as I mimicked your instrumental example. The code knows the indexes of the ListBox...
  12. M

    How to draw the user's attention only to some items of a ListBox

    I wonder whether it is possible to highlight or change the color of the text or place a symbol (for example "!") or something else to attract the user's attention only on some items of the rightmost ListBox in the attached GUI. The reason is to reduce the user's time devote to double-checking...
  13. M

    Resolved How to find an alphanumeric substring

    This is a trivial problem but I cannot get a solution. I am trying to make my code recognize strings like the following: "PTV1_3000", "ITV3_4000" The sub-string should contain a root-like "PTV", "ITV", "CTV" followed by one or more integer numbers followed by "_". I tried different flavors of...
  14. M

    Erratic behavior of TextBox "TextChanged" event

    I think I have to get my head around how classes properties are accessed. If I define the following property in the MainWindow class that is part of namespace "WPFUI" : private double _diceThreshold = 0.33; public double DiceThresholdDefault = 0.33; public double DiceThreshold...
  15. M

    Erratic behavior of TextBox "TextChanged" event

    Sorry. It does not work for me. The property "Source" does not belong to TextBox. I inserted the TextBox.Text element but still "Source" is not found. If I hover on it I can see a message stating that a namespace is missing.
  16. M

    Erratic behavior of TextBox "TextChanged" event

    I have inserted in the GUI a TextBox. It must hold a number between 0 and 1 that represents a lower threshold for accepting a structure name guessed by the Dice coefficient. I have set a default but the user can edit the threshold. Therefore I have to check the number entered is between 0 and...
  17. M

    How to use a ComboBox as a dropdown menu

    I have to show a list of strings (Trial names) that are fetched from a PostgreSQL database. The number of strings is only known at runtime. I have implemented that through a ComboBox as follows: <ComboBox x:Name="TrialDB" Grid.Row="1" Grid.Column="1" MinWidth="100"...
  18. M

    How to improve the GUI

    I will try to answer your questions to the best of my knowledge. First off, RTTQA is an international organization that performs Quality Assessment of Radiotherapy Clinical Trials. Radiotherapy is moving towards the standardization of structure names, treatment plans, and protocols. In a...
  19. M

    How to improve the GUI

    I will respond comprehensively in two days because I have to prepare my talk for an IPEM conference taking place in London. Thank you
  20. M

    How to improve the GUI

    Well, I used the colours to see where I was placing the single control. What worries me most is the underlying spatial relationship among the various controls. Why does moving a control causes some other ones to move as well? I do use a grid with rows and columns. Probably misused it. Sometimes...
Back
Top Bottom