Search results for query: *

  1. F

    ICommand interface CanExecute method question

    Ok, read that thank you. Now I do have a question for you please Skydiver (or anyone else who'd like to contribute): public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggested += value; } remove { CommandManager.RequerySuggested -= value; } } 1. Could you maybe give an...
  2. F

    ICommand interface CanExecute method question

    You are on the right track. Found the following very helpful: What is the actual task of CanExecuteChanged and CommandManager.RequerySuggested? Sadly, every article/tutorial on ICommand or RelayCommand that I have found that uses CommandRequery does not explain it.
  3. F

    ICommand interface CanExecute method question

    Skydiver Been working through the Icommand and RelayCommand tutorials. I keep on coming across the following code but the tutorial author does not explain what it means and probably just assumes reader has prior knowledge which I do not: public event EventHandler CanExecuteChanged {...
  4. F

    ICommand interface CanExecute method question

    This C# Corner article seems good and will take me some time to work through. I've never come across Bindable Objects, CommandManager.RequerySuggested, BooleanToVisibilityConverter or Prims before. Managed to install the Prism add-ons successfully but there was still and error. Had to change...
  5. F

    ICommand interface CanExecute method question

    Any examples of some code how this is done please?
  6. F

    ICommand interface CanExecute method question

    My program is based on the MVVM structure. In essence the click of a button kicks of a series of calcs with the answers displayed in textboxes. Button is bound to a property of ICommand type in the ViewModel. I currently have: public bool CanExecute(object parameter) {...
  7. F

    Question Why must a variable assignment statement be in a method?

    Yes, I get all the comments after some thought. And they make sense - that is a lot for a newbee like me. Thank you.
  8. F

    Question Why must a variable assignment statement be in a method?

    Hi I have 3 classes, viz. MyClass1, My Class2, MyClass3 (note - did not bother with Constructors for MyClass 2 and 3 here). I was playing around instantiating MyClass2 and MyClass3 in MyClass1 and calling on methods in MyClass2 and 3. Got it to work but noticed something: Following code...
  9. F

    Question Where can I find out more about a WPF program flow?

    Ok, been reading through a few times, thanks again for the link Skydiver. Article says the following: Quote: Visual Studio derives a custom class from the Application class. ]<Application x:Class="TestApplication.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"...
  10. F

    Question Where can I find out more about a WPF program flow?

    Thanks Skydiver. Some good reading I will need to work through.
  11. F

    Question Where can I find out more about a WPF program flow?

    A weakspot I still have is not understanding completely the program flow of a C# WPF application. So for example when I press the START button in Visual Studio what exactly happens? What exactly is the starting point? Is it always where the static void Main() method resides? Does...
  12. F

    Tip All PI's are not born equal!

    Yes, I guess 3.142 is better.
  13. F

    Tip All PI's are not born equal!

    Correct, so 22/7 is just an approximation for PI. Always used to just use 3.141 or what the calculator says and never gave it much thought but now am busy with calcs where the precision to 5 decimal places is important.
  14. F

    Tip All PI's are not born equal!

    I needed to calculate the formula 2 * PI * freq * 2e-4 : Using PI = 22/7, I got 0.062857142 However, using PI itself as defined per Math.PI I get 0.062831853 (freq = 50Hz) The latter result is identical to my calculator and Excel. I was using doubles. So be warned - it does seem that PI's...
  15. F

    Question Where to find matrix operation methods?

    Hi I need to do some matrix operations (inverse and multiplication ) for up to 3 x 3 matrices with complex numbers. Has this been coded in any library? Really am not looking forward to code every single calc for every matrix entry. Google search has not helped so far. Thanks.
  16. F

    Question How to bind double's to UI element in xaml?

    I have a basic textbox as follows in my xaml file: <TextBox x:Name="txtbxHCondC" Text="{Binding Path = CondCHeight, Mode=OneWayToSource}" Grid.Row="6" Grid.Column="18" FontSize="12" TextAlignment="Left" VerticalAlignment="Center" BorderThickness="0" Grid.ColumnSpan="3" /> The text attribute...
  17. F

    Question Don't fully understand the x: prefix

    Hi Been reading up on what the x: prefix in xaml really does. One comment I saw twice was - "x is used for mapping the XAML namespace in templates for projects." I find this a bit confusing. Is the namespace in templates? What templates? What is the relation between templates - namespace and...
  18. F

    Do I use MVVM or not?

    Thanks. Guess I'll go with View - Viewmodel and see how I go.
  19. F

    Do I use MVVM or not?

    Hi, I need to write a C# WPF application that does some mathematical calcs on numbers entered in the UI. The results are to be displayed in a separate page. There will be quite a bit of calcs using matrices and complex numbers. I'm tossing up as to whether I should use just code-behind or do I...
Back
Top Bottom