Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

From FlexAPI 1.6.17 to a WPF application

Mark_WS7M Member ✭✭✭
edited September 2019 in New Ideas
Hello all...

I'm starting down the path to get my WPF chops back up to speed (we have not done much at work for a while) and I thought I would venture down the lane of creating a full app based on the Flex 1.6.17 API.

I have some personal desires for station control and I'm going to use this app as my basis for creating those controls.

I know that a number of you are playing with the API and there are some far more advanced than others and I'm sure I'm somewhere in the middle but I thought I would suggest making my effort "open source" so we can all learn in parallel.

If you are playing the API, trying to learn and would like to venture into the WPF world this might be fun for you to work along with the code as I develop it, ask questions and even suggest improvements.

If you are an API/WPF expert and you see something we could be doing better please by all means educate us and help us along.

If you just think you might like the code for your own purposes then great... I'll even help you with specifics if you want.

If there is interest I'll post this on a public repository on GitHub and we can use some other medium for interaction on it.  I don't think we should put our comments, questions, concerns here on Flex Community.  So let's look at where we could all interact on this.

Anyway here is what I'm trying to accomplish:

1) Radio connection - Find radios, provide a place to connect to one of them
2) A radio window where the currently connected radio can be controlled
3) A panadapter with frequency readout and spots from HRI and also DX clusters
4) Amp and other peripheral control

In short if I can do it I want to be able to run my station from this app.  IE SmartSDR is perhaps not needed unless I want to do something I don't provide for in the app.

I think it will take some time to get to that point but it could be fun journey.  Let me know if you are interested in riding along or if you want to get your hands dirty and play.

Mark - WS7M
3 votes

Open for Comments · Last Updated


  • James Whiteway
    edited January 2016
    Sounds like fun! WPF is where I want to go. I started out with Winforms, as that is more familar to me. And to be honest, I am not sure how I feel using XAML. It seems more like web app development, than a Windows program. But, I've seen some pretty amazing things done in XAML. (SSDR for one) And I know, in the right hands, (probably not mine!) a lot of things can be accomplished. So, that is one reason, I will eventually move to using WPF for my app. Plus, it's something else to learn. I'll follow along with what you do the best I can. Who knows, I might learn something! James WD5GWY
  • Mark_WS7M
    Mark_WS7M Member ✭✭✭
    edited January 2016
    Well James, lets go bravely into the WPF realm and see what we think.

    I have to use it for work but it is very controlled and different as I don't get to do all the pieces.  We have UI designer that mainly deals with the XAML part.

    I'll post some startup stuff shortly.
  • Mark_WS7M
    Mark_WS7M Member ✭✭✭
    edited December 2018
    Here is the first video, a very simple video on creating a solution that encompasses the Flex Radio API projects and resolves build errors.


  • Dan -- KC4GO
    Dan -- KC4GO Member
    edited March 2018
    Thanks Mark. 
  • Mark_WS7M
    Mark_WS7M Member ✭✭✭
    edited July 2019
    Ok here is the first part.  I called it radio connection but really it is radio discovery because that is really what it does at this point.

    I want to be clear that I'm not a WPF expert and some of this is stuff I've learned through my work.  Like anything, there are better and worse ways to do things.  I am totally open to better ways to do what I am doing.

    Below are parts 1 2 and 3.   I'm doing these as videos at this point and I will check in the code to github probably this weekend.  For now I figure the videos move slow enough you can probably type in the code fast enough to keep up with me.

    Part 1 takes you through setting up the main view and a little bit about XAML

    Part 2 expands on XAML a little more and begins down the path of MVVM

    Part 3 we finish up and get the radio to be discovered in a truly WPF manner.

    Like in almost any language there are better ways or rather different ways to do many things.  A more experienced WPF programmer might look at my work and scoff and think why do it that way!?  Another person my see my way is better.  Just remember that there is a personal preference to things and not all things are right or wrong.  Some things are just better or perhaps worse.

    In part 2/3 I create a model which is a wrapper around the Flex API Radio object.  It is very clear the Radio object could be directly used without a model wrapper.  But the benefit of a model wrapper in my eyes is that I get to control how it behaves.  If I directly used the Flex Radio Object then I'm going to have to accept how it behaves.  So the lesson here is that wrappers help to shield object from the outside world and define their behavior in a way you want.

    This is however personal preference.  It is more code to write, it is another layer to deal with.  But in the long run this model layer will not change much but will give us a lot of power and functionality.

    I apologize for the quality of the videos.  I don't make many and hopefully I'll get better over time.

    Here is is the link covering all three parts:

    Don't be too harsh on me.  I am learning this process too!
  • Kevin
    Kevin Member
    edited December 2016
    Mark... I finally found this video and I'm working through it. You mention at the end there may be additional videos. Has that happened?

    Another thing I have to try and learn more about is the concept  of model, view, viewmodel (am I saying that right)? 
  • Jason Walther
    Jason Walther Member
    edited December 2018
    Hey Mark,
    I get to adding the lines in MainWindow.xaml for my viewModels:MainWindowViewModel. It has in the error list: "MainWindowViewModel" is not supported in a Windows Presentation Foundation (WPF) project. This is followed by a plethora of other errors. Also, says "The namespace "ViewModels" is not defined" although I have double checked for upper case characters in the name, etc. It is spelled correctly. The namespace definition for "ViewModels" is in MainWindowViewModel.cs.

    Again, THANK YOU for this excellent XAML primer!
  • Henning - DL6DH
    Henning - DL6DH Member ✭✭
    edited December 2018
    Hi, sorry for digging out this old thread... Unfortunately, the link to the video does not work anymore. Is it still available or have anyone a copy of it? 73 Henning
  • Mark_WS7M
    Mark_WS7M Member ✭✭✭
    edited December 2018
    I will dig up a fresh link this weekend for you.

  • Mark_WS7M
    Mark_WS7M Member ✭✭✭
    edited December 2018
    Life and time became short Kevin, but if you have specific questions I am always open to an email or even an on the air chat and I will do what I can to help.

  • Mark_WS7M
    Mark_WS7M Member ✭✭✭
    edited December 2018
    Jason, I am terribly sorry about letting this go so long but honestly the board has stopped sending my notification of changes to threads so I just lost track of it.

    If you are still plucking at this and having issues, send me an email!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.