Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rd-party custom Window : Building fine but not showing at runtime #587

Closed
YkTru opened this issue Nov 17, 2023 · 8 comments
Closed

3rd-party custom Window : Building fine but not showing at runtime #587

YkTru opened this issue Nov 17, 2023 · 8 comments

Comments

@YkTru
Copy link

YkTru commented Nov 17, 2023

  • Everything is working fine with the normal Window
  • Everyhting build with "ThemedWindow" (the casting in main shows "val window: ThemedWindow" for the startElmishLoop param)
  • When I start the app with "ThemedWindow", no bugs though nothing shows.

Elmish Version: <PackageReference Include="Elmish.WPF" Version="4.0.0-beta-54" />

namespace TestNamespace

open Elmish.WPF
open DevExpress.Xpf.Core

module TestApp =

(...) 

    let DesignViewModel = ViewModel.designInstance (init ()) (bindings ())

    let main (window: ThemedWindow) =
        WpfProgram.mkSimple init update bindings |> WpfProgram.startElmishLoop window
using DevExpress.Xpf.Core;

namespace Application1.WPF;

public partial class MainWindow : ThemedWindow
{
    public MainWindow()
    {
        InitializeComponent();
    }
using TestNamespace;
using System.Windows;
using DevExpress.Xpf.Core;

namespace Application1.WPF;

public partial class App : Application
{
    public App()
    {
        Activated += StartElmish;
    }

    private void StartElmish(object sender, EventArgs e)
    {
        Activated -= StartElmish;
        TestApp.main((ThemedWindow) MainWindow);
    }
}

<dx:ThemedWindow
    x:Class="Application1.WPF.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:TestNamespace;assembly=Application1"
    d:DataContext="{x:Static vm:TestApp.DesignViewModel}"
    Height="400"
    Width="600"
    Background="Gray"
    PreviewKeyDown="MainWindow_OnPreviewKeyDown"
    RoundWindowCorners="True"
    ShowIcon="False"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <Grid/>
</dx:ThemedWindow>

I really hope Elmish.WPF is not limited to the basic "Window", or I forgot/misunderstood something.

Thank you

@TysonMN
Copy link
Member

TysonMN commented Nov 18, 2023

Can you share a GitHub repository that reproduces this problem?

@YkTru
Copy link
Author

YkTru commented Nov 19, 2023

@YkTru
Copy link
Author

YkTru commented Nov 19, 2023

@TysonMN In fact, do you have access to Devexpress to test? Unless it is not Dx related?

Thank you

@TysonMN
Copy link
Member

TysonMN commented Nov 19, 2023

I don't have access to Dev Express. You will have to include all dependencies so this is easily reproducible.

@YkTru
Copy link
Author

YkTru commented Nov 20, 2023

Resolved: I went with .Net7 instead of .Net8

@YkTru YkTru closed this as completed Nov 20, 2023
@marner2
Copy link
Collaborator

marner2 commented Nov 24, 2023

@YkTru I have an active development branch for upgrading to .NET 8 (#588 ).

Would you be able to retest this case with that PR version of Elmish and Dev Express? If it works, I can push a quick release so that you can use the new .NET 8 features. Thanks!

@YkTru
Copy link
Author

YkTru commented Dec 1, 2023

Hi sorry for the late answer;

the "issue" is on DevExpress side : https://www.devexpress.com/products/net/controls/wpf/

Though they said .Net8 is now supported, I'll wait for it to be official

@YkTru
Copy link
Author

YkTru commented Apr 19, 2024

@YkTru I have an active development branch for upgrading to .NET 8 (#588 ).

Would you be able to retest this case with that PR version of Elmish and Dev Express? If it works, I can push a quick release so that you can use the new .NET 8 features. Thanks!

Hi just wanted to say that all is working fine for me with Devexpress 22, ElmishWpf 4 beta, and .Net8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants