## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
I mean clicking on it I should show the content inside the <ContentControl Grid.Row="1" x:Name="contentControl" />
Geert van Horrik
@GeertvanHorrik
That;s a Fluent.Ribbon question ;-)
I missed you geert :D , I've done it.....
you know i ask u and meanwhile the universe helps me
I*
Excuse me, but does Orchestra apply some theme by default?
I've got a strange weird problem with a vertical aligment on the textblocks
Geert van Horrik
@GeertvanHorrik
yep
you mean I've to open a ticket'
I've got a disaligment between checkboxes and textboxes
and have to manually force on each usercontrol the vertical aligment
I've looked at Orchestra's sources but it doesn't seems to apply a theme or anything else
Another thing.... I've installed latest Microsoft SDK, filename dotnet-sdk-3.0.100-preview8-013656-win-x64.exe, but I still got Severity Code Description Project File Line Suppression State Error NETSDK1045 The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. Orchestra.Core c:\program files\dotnet\sdk\2.2.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 137
what the hell is wrongs?!?
found it...without using vs2019 preview, I had to enable preview on VS2019 as described here https://devblogs.microsoft.com/dotnet/net-core-tooling-update-for-visual-studio-2017-version-15-9/, HTH
How do I disable Orchestra's Style application?
bigworld12
@bigworld12
@GeertvanHorrik i was thinking about migrating Orchestra.Shell.MahApps to the new 2.0.0 format, is it acceptable or do you have any plans for it ?
Geert van Horrik
@GeertvanHorrik
@bigworld12 the 2.0 format (as in MahApps 2.0 or .... )?
Can you create a ticket so we can discuss there?
Excuse me Geert, a really stupid question but I can't remember how it's done. if I need to fill on the MainView a ContentPresenter and bind it to a viewmodel, how do I render the view? I mean on the MainViewModel I have the viewmodel I need to show. on the MainView.Xaml I've added the ContentPresenter and it binds to a Content property. what I'm missing is the type of the property...has it to be an IView? and resolved via IViewLocator or its something that does the magic?
The magic was
<catel:ViewModelToViewConverter x:Key="ViewModelToViewConverter"></catel:ViewModelToViewConverter>
<catel:ViewModelToViewConverter x:Key="ViewModelToViewConverter"></catel:ViewModelToViewConverter>
almost 4 years I write here, and still have got problem pasting code...LOL
Geert van Horrik
@GeertvanHorrik
:)
venom_aa
@venomAA
/// <summary>
/// Dependencia para crear propiedad ContentControlBag. Nos permite mantener aislado el ContentControl de la vista modelo.
/// </summary>
typeof(MainWindow), new PropertyMetadata(null, (sender, e) => ((MainWindow)sender).UpdateContentControl()));
    private void UpdateContentControl()
{
if (ContentControlBag != null)
{
contenedorVistas.Content = null;
GC.Collect(); // necesario para que se limpie el contenedor de vistas
contenedorVistas.Content = ContentControlBag.View;
contenedorVistas.DataContext = ContentControlBag.ViewModel;
}
}

public ContentControlBag ContentControlBag
{
}
this binds the view model and view to the content property..its a dependency property on the view
and this is all i need on the viewmodel
ContentControlBag = new ContentControlBag(Activator.CreateInstance(_view), _viewmodel);
_viewmodel is an instance created by the typeFactory
and _view is the type of the view
venom_aa
@venomAA
ups..contenedorVistas is the ContentPresenter :P
venom_aa
@venomAA
@advapiIT looks like the GC.Collect isnt doing its job of forcing the unloading of the vm correctly all the time
so i have to manually close the last vm shown on the ContentPresenter in the MainViewModel. Hope the code gives you a hint to make your own :)
venom_aa
@venomAA
@advapiIT forget about what i said about the bug.. the above code works perfectly fine and the automatic close on the unload its working perfectly
Excuse me , does Orchestra implement a close service that asks before closing or have I to implmeent on my own?
Geert van Horrik
@GeertvanHorrik
hwe do have one, but not sure whether it's in orchestra or our private libs
I'm afraid it's internal
ok..
no problem,thanks
I think I have to modify the ShellService in order to intercept it
Geert van Horrik
@GeertvanHorrik
just search for the vm of the main window
then subscirbe to the close event, I think you can intercept it
I've some reminiscence of such a discussion with you almost 2 years ago
I try, thanks
just to know, since I've checek but MainView is just an usercontrol, is a simple way I can treieve the shellview view from IApplicationStartupService, so I can attach a behavior
Geert van Horrik
@GeertvanHorrik
MainView is, but it's parent is a window ;-)
that's because the window depends on the shell implementation (mahapps / fluent.ribbon / whatever)