Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    advapiIT
    @advapiIT
    you mean I've to open a ticket'
    advapiIT
    @advapiIT
    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
    advapiIT
    @advapiIT
    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?!?
    advapiIT
    @advapiIT
    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
    advapiIT
    @advapiIT
    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?
    advapiIT
    @advapiIT
    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?
    advapiIT
    @advapiIT
    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
    @advapiIT i do that with my systems..let me help you
    /// <summary>
    /// Dependencia para crear propiedad ContentControlBag. Nos permite mantener aislado el ContentControl de la vista modelo.
    /// </summary>
    public static readonly DependencyProperty ContentControlBagPropiedad = DependencyProperty.Register("ContentControlBag", typeof(ContentControlBag),
    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
        {
            get { return (ContentControlBag)GetValue(ContentControlBagPropiedad); }
            set { SetValue(ContentControlBagPropiedad, value); }
        }
    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
    advapiIT
    @advapiIT
    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
    advapiIT
    @advapiIT
    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
    advapiIT
    @advapiIT
    I've some reminiscence of such a discussion with you almost 2 years ago
    I try, thanks
    advapiIT
    @advapiIT
    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)
    advapiIT
    @advapiIT
    uhm
    true
    thx for the hint
    Geert van Horrik
    @GeertvanHorrik
    I thikn Orchestra even has a GetParentWindow extension method
    advapiIT
    @advapiIT
    super!
    Geert van Horrik
    @GeertvanHorrik
    you are lucky
    CloseApplicationWatcherBase
    just implement a watcher deriving from that one
    and register it in the servicelocator with RegisterAndInstantiate<MyWatcher>()
    you should ask your company to sponsor us ;-)