1

I got a plain MUI Main window:

<mui:ModernWindow x:Class="NeoClinic.MAS.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mui="http://firstfloorsoftware.com/ModernUI"
        Title="PAMACQUAS" IsTitleVisible="True"
        LogoData="F1 M 24.9015,43.0378L 25.0963,43.4298C 26.1685,49.5853 31.5377,54.2651 38,54.2651C 44.4623,54.2651 49.8315,49.5854 50.9037,43.4299L 51.0985,43.0379C 51.0985,40.7643 52.6921,39.2955 54.9656,39.2955C 56.9428,39.2955 58.1863,41.1792 58.5833,43.0379C 57.6384,52.7654 47.9756,61.75 38,61.75C 28.0244,61.75 18.3616,52.7654 17.4167,43.0378C 17.8137,41.1792 19.0572,39.2954 21.0344,39.2954C 23.3079,39.2954 24.9015,40.7643 24.9015,43.0378 Z M 26.7727,20.5833C 29.8731,20.5833 32.3864,23.0966 32.3864,26.197C 32.3864,29.2973 29.8731,31.8106 26.7727,31.8106C 23.6724,31.8106 21.1591,29.2973 21.1591,26.197C 21.1591,23.0966 23.6724,20.5833 26.7727,20.5833 Z M 49.2273,20.5833C 52.3276,20.5833 54.8409,23.0966 54.8409,26.197C 54.8409,29.2973 52.3276,31.8106 49.2273,31.8106C 46.127,31.8106 43.6136,29.2973 43.6136,26.197C 43.6136,23.0966 46.127,20.5833 49.2273,20.5833 Z"          
        ContentSource="/Pages/Home.xaml"
        WindowState="Maximized"
        WindowStartupLocation="CenterScreen"
        Closing="Window_Closing">

    <mui:ModernWindow.MenuLinkGroups>
        <mui:LinkGroup x:Name="Pamakwas" DisplayName="Welcome">
            <mui:LinkGroup.Links>
                <mui:Link DisplayName="Home" Source="/Pages/Home.xaml" />
                <mui:Link DisplayName="Configurations" Source="ConfigurationsList.xaml" />
            </mui:LinkGroup.Links>


        </mui:LinkGroup>
        <mui:LinkGroup DisplayName="settings" GroupName="settings">
            <mui:LinkGroup.Links>
                <mui:Link DisplayName="software" Source="/Pages/Settings.xaml" />
            </mui:LinkGroup.Links>
        </mui:LinkGroup>
    </mui:ModernWindow.MenuLinkGroups>



    <mui:ModernWindow.TitleLinks>
        <mui:Link DisplayName="settings" Source="/Pages/Settings.xaml" />
    </mui:ModernWindow.TitleLinks>

</mui:ModernWindow>

first is the , the word "Welcome" is always converted to lowercase. How can I disable that?

2nd, as you see in the:

<mui:LinkGroup.Links>
                    <mui:Link DisplayName="Home" Source="/Pages/Home.xaml" />
                    <mui:Link DisplayName="Configurations" Source="ConfigurationsList.xaml" />
                </mui:LinkGroup.Links>

I got 2 Sources, If I click the Configurations, The DataGridView of my table is loaded (a UserControl), there is a NewEntryButton in that UserControl. I want it to unload the DataGridView UserControl if the NewEntryButton is pressed, but I don't know how to unload and load another UserControl in that same Link.

Please show me a xaml version (if there's any) and a C# code version(if there's any)

Marcel B
  • 3,624
  • 2
  • 27
  • 39
Kokombads
  • 450
  • 2
  • 9
  • 23
  • have u checked that your code is not changing values of welcome ? and second thing any other style is not affecting case of welcome? – Ashok Rathod Jul 24 '14 at 09:08
  • what do you mean my code is not changing values of welcome?, I haven't tried about using style if that's what you mean. – Kokombads Jul 24 '14 at 15:15
  • I want to tell you there your code behind file is not changing values of welcome – Ashok Rathod Jul 25 '14 at 02:53
  • no it doesn't. ANd I don't know how to do it – Kokombads Jul 25 '14 at 03:06
  • it is the case that you are previously placed there "welcome"(in small letter).If so then might be your solution is not build properly after change in xaml so what you can do is clean solution and rebuild your solution and check . – Ashok Rathod Jul 25 '14 at 03:25
  • nope, here is my constructor public MainWindow(User myUser) { InitializeComponent(); fUserMgr.Entity.UserName = myUser.UserName; Pamakwas.DisplayName = String.Format("Welcome {0}", fUserMgr.Entity.UserName); } – Kokombads Jul 26 '14 at 18:54

1 Answers1

3

To navigate to a different page by code you can use

NavigationCommands.GoToPage.Execute("/Pages/MyPage.xaml", this);

In XAML you use a BBCodeBlock

<mui:BBCodeBlock BBCode="[url=/Pages/MyPage.xaml]go to my page[/url]" />

like explained in the documentation.

AFAIK navigating to a new page does not "unload" the previous one. The page (UserControl) is still alive in memory. Nothing to worry about until your application has hundreds of pages.

corradolab
  • 718
  • 3
  • 16
  • how about navigating from Page1 of GroupLlink1 to Page1 of GroupLink2? I used your NavigationCommands.GoToPage... it worked, the Page1 of GroupLink2 was navigated but I was still in the GroupLink1 instead of GroupLink2. – Kokombads Jan 31 '15 at 08:10
  • I dont experience this behaviour. When I navigate to another page the main menu update accordingly. Of course you must have a main menu entry for the page you are navigating to. – corradolab Feb 02 '15 at 09:42
  • so did I miss something here? http://stackoverflow.com/questions/28249707/modern-ui-how-to-go-to-another-page-from-another-link – Kokombads Feb 03 '15 at 21:39
  • This is years late but thanks - came across this today and it was just what I was looking for. – Lift Feb 01 '18 at 19:16