<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>codeframework Discussions Rss Feed</title><link>http://codeframework.codeplex.com/discussions</link><description>codeframework Discussions Rss Description</description><item><title>New Post: Menu "hot" keys</title><link>https://codeframework.codeplex.com/discussions/444525</link><description>&lt;div style="line-height: normal;"&gt;Markus,&lt;br /&gt;
&lt;br /&gt;
It used to be that if we preceeded a menu item with &amp;quot;&amp;amp;&amp;quot;, it would result in the next character getting an underline and responding to shortcut keys.  We could also define a keyboard shortcut such as CTRL-P, etc. that would accomplish the same thing.&lt;br /&gt;
&lt;br /&gt;
I have tried _, \, /, *, -, and !, but none of these accomplish this.  Nor can I find a way to tie in the CTRL key to the menu. &lt;br /&gt;
&lt;br /&gt;
Can you give me a hint as to what I need to do to support these 2 items?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Fletcher&lt;br /&gt;
&lt;/div&gt;</description><author>FletcherJ</author><pubDate>Wed, 22 May 2013 05:02:25 GMT</pubDate><guid isPermaLink="false">New Post: Menu "hot" keys 20130522050225A</guid></item><item><title>New Post: ViewAction userRoles usage</title><link>http://codeframework.codeplex.com/discussions/444523</link><description>&lt;div style="line-height: normal;"&gt;Markus,&lt;br /&gt;
&lt;br /&gt;
While wandering through the ViewAction code, I saw a setting for userRoles.  Are there any docs on how that is used?  I have a number of menus and other actions that are controlled by the level of the user, so am quite interested in using this the &amp;quot;correct&amp;quot; way.&lt;br /&gt;
&lt;br /&gt;
Links to any appropriate info is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Fletcher&lt;br /&gt;
&lt;/div&gt;</description><author>FletcherJ</author><pubDate>Wed, 22 May 2013 04:57:42 GMT</pubDate><guid isPermaLink="false">New Post: ViewAction userRoles usage 20130522045742A</guid></item><item><title>New Post: Expander Control</title><link>http://codeframework.codeplex.com/discussions/443670</link><description>&lt;div style="line-height: normal;"&gt;Markus,&lt;br /&gt;
&lt;br /&gt;
I did, but it seems to end prematurely and the next video is about an alligator.... &lt;br /&gt;
&lt;br /&gt;
So I saw the new UI, but didn't see much that could help before it ended (but I may have missed it.)&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Fletcher&lt;br /&gt;
&lt;/div&gt;</description><author>FletcherJ</author><pubDate>Wed, 22 May 2013 04:54:50 GMT</pubDate><guid isPermaLink="false">New Post: Expander Control 20130522045450A</guid></item><item><title>New Post: Expander Control</title><link>http://codeframework.codeplex.com/discussions/443670</link><description>&lt;div style="line-height: normal;"&gt;You mean a tab control acting like an expander? I don't have a specific example for that. But did you see the video in that other link I posted?&lt;br /&gt;
&lt;br /&gt;
Markus&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Wed, 22 May 2013 00:49:06 GMT</pubDate><guid isPermaLink="false">New Post: Expander Control 20130522124906A</guid></item><item><title>New Post: Expander Control</title><link>http://codeframework.codeplex.com/discussions/443670</link><description>&lt;div style="line-height: normal;"&gt;Markus,&lt;br /&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
One approach I personally like is to not use expanders, but to stick with a tab control instead. This is not real obvious to most people, but you can create tab controls with tab pages and then just create a style that looks exactly like the expanders with multiple tab pages shown at the same time&amp;lt;&amp;lt;&lt;br /&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
Ok, now I am confused again (so what else is new... :) )&lt;br /&gt;
&lt;br /&gt;
Could you point me to an example of a grid that behaves like an expander?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Fletcher&lt;br /&gt;
&lt;/div&gt;</description><author>FletcherJ</author><pubDate>Wed, 22 May 2013 00:18:19 GMT</pubDate><guid isPermaLink="false">New Post: Expander Control 20130522121819A</guid></item><item><title>New Post: Creating submenus, etc.</title><link>http://codeframework.codeplex.com/discussions/444503</link><description>&lt;div style="line-height: normal;"&gt;Markus,&lt;br /&gt;
&lt;br /&gt;
I can create a menu (and now a toolbar, thank you) using the battleship theme.&lt;br /&gt;
&lt;br /&gt;
Let's say I have the following:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Actions.Add(new ViewAction(&amp;quot;Open&amp;quot;, category: &amp;quot;File&amp;quot;, execute: (a, o) =&amp;gt; Controller.Message(&amp;quot;Open clicked!&amp;quot;), significance: ViewActionSignificance.AboveNormal, categoryOrder: 0));
Actions.Add(new ViewAction(&amp;quot;Close&amp;quot;, category: &amp;quot;File&amp;quot;, execute: (a, o) =&amp;gt; Controller.Message(&amp;quot;Close clicked!&amp;quot;)));
Actions.Add(new ViewAction(&amp;quot;Exit&amp;quot;, category: &amp;quot;File&amp;quot;, execute: (a, o) =&amp;gt; Controller.Message(&amp;quot;Exit clicked!&amp;quot;)));&lt;/code&gt;&lt;/pre&gt;

And now I want to have a submenu under close with the following options:&lt;br /&gt;
 close current&lt;br /&gt;
 close all&lt;br /&gt;
&lt;br /&gt;
I know this is simplistic, but you get the idea.&lt;br /&gt;
&lt;br /&gt;
I am guessing that to do so, I only need to do something with the category value, but not sure what I would do with it so that these appear as a submenu.&lt;br /&gt;
&lt;br /&gt;
I am guessing it's in the style, but am still learning how to interpret those.... &lt;br /&gt;
&lt;br /&gt;
Also, if I set an action to have the highestSignificance (so it is included in the toolbar), how will that affect the position/implementation in the menu (if at all)?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Fletcher&lt;br /&gt;
&lt;/div&gt;</description><author>FletcherJ</author><pubDate>Wed, 22 May 2013 00:06:03 GMT</pubDate><guid isPermaLink="false">New Post: Creating submenus, etc. 20130522120603A</guid></item><item><title>New Post: Battleship toolbar</title><link>https://codeframework.codeplex.com/discussions/442492</link><description>&lt;div style="line-height: normal;"&gt;The way this works is actually pretty straightforward: In the Battleship theme, all view actions of the StartViewModel that have their Significance property set to Highest, will (by default) show in the toolbar. So if you define your view action like this inside the StartViewModel, it will show up as a toolbar item in addition to being in the menu:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Actions.Add(new ViewAction(&amp;quot;Customers&amp;quot;, execute: (a, o) =&amp;gt; Controller.Action(&amp;quot;Customer&amp;quot;, &amp;quot;List&amp;quot;), category: &amp;quot;Customer&amp;quot;) 
 {
    Significance = ViewActionSignificance.Highest,
); &lt;/code&gt;&lt;/pre&gt;

&lt;em&gt;Note: This is only the default behavior and it can be changed in the Shell style in the battleship theme. But that is probably not needed in most scenarios.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
Then of course there are view actions defined by individual views. All view actions defined in individual view models are always shown in toolbars in the Battleship theme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Markus&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Sat, 18 May 2013 11:57:32 GMT</pubDate><guid isPermaLink="false">New Post: Battleship toolbar 20130518115732A</guid></item><item><title>New Post: Battleship toolbar</title><link>https://codeframework.codeplex.com/discussions/442492</link><description>&lt;div style="line-height: normal;"&gt;I'll see if I can put together an example.&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Thu, 16 May 2013 23:07:00 GMT</pubDate><guid isPermaLink="false">New Post: Battleship toolbar 20130516110700P</guid></item><item><title>New Post: CODE FW Template for new implementation</title><link>https://codeframework.codeplex.com/discussions/443510</link><description>&lt;div style="line-height: normal;"&gt;Sounds good. Sorry about having responded a bit late on some of those. I really wish Codeplex would notify me of new questions. I only get notified when responses to existing questions are posted :-(&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Thu, 16 May 2013 23:06:20 GMT</pubDate><guid isPermaLink="false">New Post: CODE FW Template for new implementation 20130516110620P</guid></item><item><title>New Post: Default ViewModel causes startup issue</title><link>https://codeframework.codeplex.com/discussions/443950</link><description>&lt;div style="line-height: normal;"&gt;Just do this:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Actions.Add(new ViewAction(&amp;quot;Customers&amp;quot;, execute: (a, o) =&amp;gt; Controller.Action(&amp;quot;Customer&amp;quot;, &amp;quot;List&amp;quot;), category: &amp;quot;Customer&amp;quot;) 
 {
    Significance = ViewActionSignificance.AboveNormal
}); &lt;/code&gt;&lt;/pre&gt;

Then, in the List() method of the controller, do that:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;public ActionResult List()
{
    return View(new CustomerListViewModel());
}&lt;/code&gt;&lt;/pre&gt;

In the CustomerListViewModel class, you load your data. Ideally async:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;public class CustomerListViewModel : ViewModel
{
    public CustomerListViewModel()
    {
        Customers = new ObservableCollection&amp;lt;CustomerViewModel&amp;gt;();
        LoadData();
    }

    private void LoadData()
    {
        AsyncWorker.Execute(() =&amp;gt; {
                List&amp;lt;Customer&amp;gt; customers = HoweverYouGetYourData();
                return customers;
            }, customers =&amp;gt; {
                Customers.Clear();
                foreach (var customer in customers)
                    Customers.Add(new CustomerViewModel{ /* map all the properties here */ });
            }, this);
    }

    public ObservableCollection&amp;lt;CustomerViewModel&amp;gt; Customers { get; set; }
}&lt;/code&gt;&lt;/pre&gt;

This way 1) your view action stays simple, 2) you are not taking a performance hit until the data is actually needed, and 3) the data is loaded async so no significant delay will be seen, and 4) since you are using our AsyncWorker it automatically allows you to do things on the background thread (1st parameter) and then funnels everything to the foreground thread where you can handle the result and assign to the UI in a thread-safe manner (2nd parameter) and since we are passing this (3rd parameter) into the async worker, it can even update a status indicator that will then get picked up by styles, so you will even see a progress indicator in the UI without having to do anything else (assuming you are using our styles).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Markus&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Thu, 16 May 2013 23:02:49 GMT</pubDate><guid isPermaLink="false">New Post: Default ViewModel causes startup issue 20130516110249P</guid></item><item><title>New Post: CODE FW Template for new implementation</title><link>https://codeframework.codeplex.com/discussions/443510</link><description>&lt;div style="line-height: normal;"&gt;Markus,&lt;br /&gt;
&lt;br /&gt;
As you may note, I am only replying when I have something to add.  But wanted to thank you for all the answers to all the threads.&lt;br /&gt;
&lt;br /&gt;
And yes, that's just what I mean.  I set up the contracts and then find I need to add a couple more tables with their respective contracts.  Once done, I have to manually build the implementation classes.&lt;br /&gt;
&lt;br /&gt;
At this point, I have so much other stuff to do/learn that getting this fixed isn't as high as some of the other issues (like validation.)&lt;br /&gt;
&lt;br /&gt;
Thanks again!&lt;br /&gt;
&lt;br /&gt;
Fletcher&lt;br /&gt;
&lt;/div&gt;</description><author>FletcherJ</author><pubDate>Thu, 16 May 2013 22:56:54 GMT</pubDate><guid isPermaLink="false">New Post: CODE FW Template for new implementation 20130516105654P</guid></item><item><title>New Post: Default ViewModel causes startup issue</title><link>https://codeframework.codeplex.com/discussions/443950</link><description>&lt;div style="line-height: normal;"&gt;Markus,&lt;br /&gt;
&lt;br /&gt;
Correct.  I am trying to get a menu option that shows (as appropriate for the theme - I just happen to be using Battleship as my default).&lt;br /&gt;
&lt;br /&gt;
I use the code above to add the menu item.  Apparently I am implementing this incorrectly.  Let me review the docs/notes I have to find out the correct way to add the menu item.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Fletcher&lt;br /&gt;
&lt;/div&gt;</description><author>FletcherJ</author><pubDate>Thu, 16 May 2013 22:48:30 GMT</pubDate><guid isPermaLink="false">New Post: Default ViewModel causes startup issue 20130516104830P</guid></item><item><title>New Post: Battleship toolbar</title><link>https://codeframework.codeplex.com/discussions/442492</link><description>&lt;div style="line-height: normal;"&gt;Markus,&lt;br /&gt;
&lt;br /&gt;
I can live with the toolbar stuck at the top (at least for now.)&lt;br /&gt;
&lt;br /&gt;
What might be helpful is a simple example that had some menu items and a toolbar.&lt;br /&gt;
&lt;br /&gt;
In my case, my call to create a menu option is:&lt;br /&gt;
&lt;br /&gt;
Actions.Add(new ViewAction(&amp;quot;Customers&amp;quot;, execute: (a, o) =&amp;gt; Controller.Action(&amp;quot;Customer&amp;quot;, &amp;quot;List&amp;quot;), category: &amp;quot;Customer&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Significance = ViewActionSignificance.AboveNormal,
ActionView = Controller.LoadView(StandardViews.LargeText03),
ActionViewModel = new CustomerListViewModel()&lt;/code&gt;&lt;/pre&gt;

});&lt;br /&gt;
&lt;br /&gt;
What do I do different to get the same option to also appear in a toolbar?  Since I don't see any specific statement that forces this to be a menu, I don't know what I would change to have it go into a toolbar.&lt;br /&gt;
&lt;br /&gt;
I tried to use the following to create a toolbar, but this didn't work:&lt;br /&gt;
Actions.Add(new ViewActionToolbar());&lt;br /&gt;
&lt;br /&gt;
I then tried:&lt;br /&gt;
ViewActionToolbar foo = new ViewActionToolbar();&lt;br /&gt;
&lt;br /&gt;
But then couldn't figure out what to do with foo (it doesn't seem to have an items, buttons, Add(), viewxxx, or other method/property to which I could add buttons.&lt;br /&gt;
&lt;br /&gt;
I am sure it's really simple, I just seem to be missing it.&lt;br /&gt;
&lt;/div&gt;</description><author>FletcherJ</author><pubDate>Thu, 16 May 2013 22:44:21 GMT</pubDate><guid isPermaLink="false">New Post: Battleship toolbar 20130516104421P</guid></item><item><title>New Post: Default ViewModel causes startup issue</title><link>https://codeframework.codeplex.com/discussions/443950</link><description>&lt;div style="line-height: normal;"&gt;Are you showing a customer list inside your action then? I don't think so, right?&lt;br /&gt;
&lt;br /&gt;
The approach you are showing above is when the action itself has it's own view and view model. This would be the case if you are using your action as a tile in a Metro UI and you want to show data inside that tile that is non-standard. Typically, this would be a very simple model that would show maybe the number of total customers and the number of new customers, or something like that. Not an entire list. And I think that is not what you are trying to do, right?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Markus&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Thu, 16 May 2013 22:41:08 GMT</pubDate><guid isPermaLink="false">New Post: Default ViewModel causes startup issue 20130516104108P</guid></item><item><title>New Post: Execute call fails with NO info or clue</title><link>https://codeframework.codeplex.com/discussions/442496</link><description>&lt;div style="line-height: normal;"&gt;Yeah, that is def. something we should do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Markus&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Thu, 16 May 2013 22:35:34 GMT</pubDate><guid isPermaLink="false">New Post: Execute call fails with NO info or clue 20130516103534P</guid></item><item><title>New Post: Tip-What to check if a form/action doesn't fire</title><link>https://codeframework.codeplex.com/discussions/442500</link><description>&lt;div style="line-height: normal;"&gt;Good post. I will add this to the quick tips if you don't mind.&lt;br /&gt;
&lt;br /&gt;
We have actually pondered whether to expand on this whole concept a bit and make it more strongly typed. We like that our current approach is practically identical to ASP.NET MVC. But what you describe above is not an uncommon problem as a result of this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Markus&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Thu, 16 May 2013 22:35:02 GMT</pubDate><guid isPermaLink="false">New Post: Tip-What to check if a form/action doesn't fire 20130516103502P</guid></item><item><title>New Post: Converting VFP reports to .NET</title><link>https://codeframework.codeplex.com/discussions/442506</link><description>&lt;div style="line-height: normal;"&gt;Yup, we actually have tools for that, and for reports that works quite well. Check out the tools section on &lt;a href="http://www.VFPConversion.com" rel="nofollow"&gt;www.VFPConversion.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Markus&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Thu, 16 May 2013 22:32:36 GMT</pubDate><guid isPermaLink="false">New Post: Converting VFP reports to .NET 20130516103236P</guid></item><item><title>New Post: What CODE FW tools would be the best approach?</title><link>https://codeframework.codeplex.com/discussions/442508</link><description>&lt;div style="line-height: normal;"&gt;See the other message. But to add to that: I think developing with standard tab controls would be the best approach here and then just style those tabs so they look very different. I could imagine that quite well. But a detailed explanation of this would go quite a bit beyond of what I can cover in a short answer :-)&lt;br /&gt;
&lt;br /&gt;
Take a look at this video of mine to get a good idea of what styled tabs can look like:&lt;br /&gt;
&lt;a href="http://www.youtube.com/watch?v=0OGvHq4zePg&amp;amp;list=UUO8-eGIIsxupldy-lOLfD2Q&amp;amp;index=4" rel="nofollow"&gt;http://www.youtube.com/watch?v=0OGvHq4zePg&amp;list=UUO8-eGIIsxupldy-lOLfD2Q&amp;index=4&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Markus&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Thu, 16 May 2013 22:31:16 GMT</pubDate><guid isPermaLink="false">New Post: What CODE FW tools would be the best approach? 20130516103116P</guid></item><item><title>New Post: Controller.Message not working</title><link>https://codeframework.codeplex.com/discussions/443032</link><description>&lt;div style="line-height: normal;"&gt;Controller.Message() creates messageboxes as standard views. As such, it requires a Shell to be open to work. What I would do if you absolutely need to do something before you have the root UI (the shell) running is just use the standard message box features. So just MessageBox.Show(). (You could also register another view handler and handle the message yourself, but that would be a hassle and probably not worth it). &lt;br /&gt;
&lt;br /&gt;
From my point of view, the preferable way would be to get the Shell up and running before you do anything else. This way, the infrastructure has launched, and now you have all the standard features available.&lt;br /&gt;
&lt;br /&gt;
On the file dialog: The framework doesn't define folder dialogs as they are already available in the .NET framework.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Markus&lt;br /&gt;
&lt;/div&gt;</description><author>MarkusEgger</author><pubDate>Thu, 16 May 2013 22:26:55 GMT</pubDate><guid isPermaLink="false">New Post: Controller.Message not working 20130516102655P</guid></item><item><title>New Post: Default ViewModel causes startup issue</title><link>https://codeframework.codeplex.com/discussions/443950</link><description>&lt;div style="line-height: normal;"&gt;Markus,&lt;br /&gt;
&lt;br /&gt;
The following code is from StartViewModel and is how I was lead to believe we should implement menu options:&lt;br /&gt;
&lt;br /&gt;
Actions.Add(new ViewAction(&amp;quot;Customers&amp;quot;, execute: (a, o) =&amp;gt; Controller.Action(&amp;quot;Customer&amp;quot;, &amp;quot;List&amp;quot;), category: &amp;quot;Customer&amp;quot;)&lt;br /&gt;
{&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Significance = ViewActionSignificance.AboveNormal,
ActionView = Controller.LoadView(StandardViews.LargeText03),
ActionViewModel = new CustomerListViewModel()&lt;/code&gt;&lt;/pre&gt;

});&lt;br /&gt;
&lt;br /&gt;
In this code, the last part creates a new instance of CustomerListViewModel.&lt;br /&gt;
&lt;br /&gt;
The constructor in the CustomerListViewModel calls the LoadData() method - which for the list, brings down all the customers.&lt;br /&gt;
&lt;br /&gt;
This is run before the menu options are displayed as it is part of how they get defined.&lt;br /&gt;
&lt;br /&gt;
So when each xxxListViewModel gets defined, it gets a copy of all the data that should appear in the list - even though the call is only to define the menu, not display the data.&lt;br /&gt;
&lt;br /&gt;
I would assume that the FW then does a refresh on the loaded data prior to displaying it when the menu option is selected.&lt;br /&gt;
&lt;br /&gt;
My point is that, as the menu is being built, each ViewModel that is being attached to menu options is loading a bunch of data that is not needed at the time.  If my app has well over a 100 tables, each with many rows, just getting the menu to show will be slow, not to mention generating a ton of network traffic that isn't really used.&lt;br /&gt;
&lt;br /&gt;
So my thought is that I want to instantiate the xxxListViewModel, but take the call to LoadData out of it.  But if I do this, it doesn't work.  So I need to know where I can move the LoadData call so that it is called before the view is rendered (but not on instantiation.)  I am guessing I can put it in an event, but not sure which one would be appropriate within the CODE FW, that's all.&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;/div&gt;</description><author>FletcherJ</author><pubDate>Thu, 16 May 2013 22:23:51 GMT</pubDate><guid isPermaLink="false">New Post: Default ViewModel causes startup issue 20130516102351P</guid></item></channel></rss>