HandyOrg / HandyControl

Contains some simple and commonly used WPF controls
https://handyorg.github.io/
MIT License
6.03k stars 1.02k forks source link

Growl Does not work #593

Closed MohammadRezaKashi closed 3 years ago

MohammadRezaKashi commented 3 years ago

When I Use

<Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <hc:Theme Skin="Dark"/> 
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

in a custom WPF User control insted of using in the App.xaml

HandyControl.Controls.Growl.ErrorGlobal("GrowlError");

does not work.

ghost1372 commented 3 years ago

I think this behavior is normal. Did you do this just to use a specific theme? if yes We can wait and see what happens to this feature Which can easily solve your problem.

MohammadRezaKashi commented 3 years ago

Hello Thank you for your attention I just use handy control theme in my project but when I add handy control theme to the resources in App.xaml file I have some problems, for example When l show a dialog in a different thread I have an exception so I decided to use handy control just in specific WPF user control but when I add handy control theme to a specific user control resources some features does not work for example growl notification, and I don't know what I have to do. Please help to solve this problem.

On Sat, Dec 19, 2020, 7:47 PM Mahdi Hosseini notifications@github.com wrote:

I think this behavior is normal. Did you do this just to use a specific theme? if yes We can wait and see what happens to this https://github.com/HandyOrg/HandyControl/pull/574 feature Which can easily solve your problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HandyOrg/HandyControl/issues/593#issuecomment-748493883, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNQSWLLWVHIVJ3ZZVARQO3SVTG2XANCNFSM4VCJAVFA .

ghost1372 commented 3 years ago

I think it's better to see what's wrong with displaying dialog in different thread If this is a bug we can fix it Please attach a sample project.

MohammadRezaKashi commented 3 years ago

Hello dear Mahdi Hosseini As you sead I have attached a sample project which there is an exception when I try to show a dialog in a different thread when Hancy control is attached in App.xaml.

File Password:123456 Just before compile the project please install the handy control package

I am waiting to hear from you

thank you

On Sat, Dec 19, 2020 at 11:35 PM Mahdi Hosseini notifications@github.com wrote:

I think it's better to see what's wrong with displaying dialog in different thread If this is a bug we can fix it Please attach a sample project.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HandyOrg/HandyControl/issues/593#issuecomment-748518884, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNQSWO7HAMZHKUFBUSDUCTSVUBSFANCNFSM4VCJAVFA .

ghost1372 commented 3 years ago

@kouroshkashi Looks like you forgot to attach the file

MohammadRezaKashi commented 3 years ago

I think gmail has filtered my attachments. by the way I attached the file. pass:123456

On Sun, Dec 20, 2020 at 10:40 AM Mahdi Hosseini notifications@github.com wrote:

@kouroshkashi https://github.com/kouroshkashi Looks like you forgot to attach the file

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HandyOrg/HandyControl/issues/593#issuecomment-748572396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNQSWOWSEVQZKE4E3OCVXDSVWPNFANCNFSM4VCJAVFA .

DineshSolanki commented 3 years ago

I think gmail has filtered my attachments. by the way I attached the file. pass:123456 On Sun, Dec 20, 2020 at 10:40 AM Mahdi Hosseini @.***> wrote: @kouroshkashi https://github.com/kouroshkashi Looks like you forgot to attach the file — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#593 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNQSWOWSEVQZKE4E3OCVXDSVWPNFANCNFSM4VCJAVFA .

drag and drop the zip here in the comment box directly

MohammadRezaKashi commented 3 years ago

Please let me know if there is any problem. thank you.

On Sun, Dec 20, 2020 at 10:51 AM seyed mohammad reza seyed jafar kashi < mohammadreza.kashi.1992@gmail.com> wrote:

I think gmail has filtered my attachments. by the way I attached the file. pass:123456

On Sun, Dec 20, 2020 at 10:40 AM Mahdi Hosseini notifications@github.com wrote:

@kouroshkashi https://github.com/kouroshkashi Looks like you forgot to attach the file

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HandyOrg/HandyControl/issues/593#issuecomment-748572396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNQSWOWSEVQZKE4E3OCVXDSVWPNFANCNFSM4VCJAVFA .

MohammadRezaKashi commented 3 years ago

WpfApplication.zip

ghost1372 commented 3 years ago

you can fix your issue with Dispatcher, anyway this issue has nothing to do with HandyControl

Thread thread = new Thread(() =>
            {
                Dispatcher.Invoke(() =>
                {
                    pbw = new Window();

                    pbw.ShowInTaskbar = false;
                    pbw.ShowDialog();

                });
            });
MohammadRezaKashi commented 3 years ago

thank you for your answer but I can use of dispatcher because I want to use new window as a loading page which is close by an other function. If I use dispatcher I will loss my synchronize in my workflow. I want to show a dialog in a thread then call a function and after that the function do its job it closes the dialog.

on the other hand I can send you a sample project which I add handy control in the user control resources instead of App.xaml growl notification does not work.

ghost1372 commented 3 years ago

@kouroshkashi شما یک پنجره جدید ایجاد میکنید و اساسا این یک دیالوگ نیست برای اشنایی با دیالوگ مستندات رو مطالعه کنید https://ghost1372.github.io/handycontrol/extend_controls/dialog/ اگر منظورتان از پنجره لودینگ اسپلش اسکرین هست شما میتونید به این صورت یک اسپلش اسکرین هنگام بارگذاری برنامه نمایش بدید

protected override void OnStartup(StartupEventArgs e)
        {
var splashScreen = new SplashScreen("Resources/Img/Cover.png");
                splashScreen.Show(true);

                base.OnStartup(e); 
}
MohammadRezaKashi commented 3 years ago

GrowlNotif.zip سلام میشه لطف کنید این پروژه هم بررسی بفرمایید. خیلی ممنون میشم