Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:28
    raimand13 closed #1836
  • 05:28
    raimand13 commented #1836
  • Mar 02 00:43
    Erapchu closed #2260
  • Mar 02 00:43
    Erapchu commented #2260
  • Mar 01 16:08
    Keboo commented #2264
  • Mar 01 15:35
    SID9-HoneyBee opened #2264
  • Mar 01 14:57
    mtbayley commented #1684
  • Mar 01 10:14
    w-syss commented #2188
  • Mar 01 08:30
    Bartos-Pol opened #2263
  • Feb 28 20:47
    emanuelhristea commented #2125
  • Feb 28 20:44
    emanuelhristea commented #2125
  • Feb 28 06:06
    Keboo labeled #2262
  • Feb 28 06:06
    Keboo commented #2262
  • Feb 28 03:32
    philpowers commented #2188
  • Feb 27 20:28
    Keboo commented #2261
  • Feb 27 20:14
    LabuzzMichal commented #2261
  • Feb 27 13:28
    Yoooi0 opened #2262
  • Feb 27 10:02
    Erapchu commented #2260
  • Feb 27 09:42
    Erapchu edited #2260
  • Feb 27 08:53
    jespersh commented #2188
Said1996
@Said1996
@Shreyasj96 Thanks so much ill give it a shot and tell you the result
Said1996
@Said1996
@Shreyasj96 No, not working
Shreyasj96
@Shreyasj96
@Said1996 Where have you put your dialogcontent?
Said1996
@Said1996
inside dialogHost
I tested the binding, the binding isn't working
Shreyasj96
@Shreyasj96
@Said1996 Then you might have to do it from the ViewModel itself if you are following MVVM or from the code behind by setting the IsOpen of the DialogHost to true.
Said1996
@Said1996
is there any way around that?
Shreyasj96
@Shreyasj96
Can you post the whole xaml?
Said1996
@Said1996
I wrote all the parts thats related to DialogHost ... no other part uses that
the whole problem is that i am binding to a button in a datatemplate so its normally binded sourcelist
and binding to element name could work if we could find the correct path ... I tried your example + path = OpenDialogCommand still no clue
Shreyasj96
@Shreyasj96
@Said1996 It's a bit confusing what you're trying to do and i don't think it can be done the way you are trying to do right now.
Said1996
@Said1996
it's not confusing all I have is a list of where each item contains some labels and a button and i want to open a dialog host when any of those buttons are pressed
that's basic I guess
Shreyasj96
@Shreyasj96
Any progress?
Said1996
@Said1996
ummm no but ill guess ill do it from code behind
Thanks a lot for helping, I guess its the only way now
Shreyasj96
@Shreyasj96
<ListView ItemSource={Binding YourItemSource}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding YourLabelConent}"/>
<Button Command="{Binding YourButtonCommand}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Gary Wu
@garywu123
Hello Guys. Does someone help me to understand why DialogHost.Show is aysnc? When it is not on GUI thread?
Kevin B
@Keboo
@garywu123 unlike the message box (which blocks) the thread, it is async to allow for the UI thread to continue. This allows for things like animations to continue running on the UI thread, while the dialog is shown and provides for a convenient way to return a result from the dialog when it is closed.
Miosss
@Miosss
Hi all, I try to use PopupBox, though 2 examples from 3.1.2 demo are broken (Buttons->PopupBox->round buttons). Is there way to pass DataContext (even by RelativeSource) to the popup? It is created outside of the visual tree (PopupRoot). It seems to be working (sometimes?), but VisualStudio debugger complains about RelativeSource not being found. So, I am not sure - is it working or not?
ah, and native wpf Popup can use PlacementTarget to bind DataContext to itself, but there is no PlacementTarget in PopupBox
To be more precise - it kinda works, but VS debugger reports binding errors (relativesource not found).
and second question - close command in PopupBox is using RoutedCommand - but I use it in DataGrid header and it triggers DataGridColumn click (I think) which is not in visual tree which throws exception and crashes - System.Windows.Documents.Run” is not Visual or Visual3D.'
Miosss
@Miosss
materialDesign:DataGridAssist.EnableEditBoxAssist="False" fixes the issue, because AllowDirectEditWithoutFocus was in the call stack of this bubbling event; not ideal though
Kevin B
@Keboo

@Miosss in regards to the popup box that sort of makes sense, the VS designer has historically been a pain to work with. What version of Visual Studio are you on? I know some of the later version (16.8+) have had some significant rework and it may be worth taking another stab at addressing the design time of the controls.

For the second issue that sounds like a bug, do you mind opening an issue for it?

Miosss
@Miosss
@Keboo yup, the designer can be problematic, but this also occurs during runtime - debugger complains about it in binding errors
@Keboo but what should I expect about DataContext in PopupBox? should it inherit parent DataContext? should RelativeSource be obtainable in it? or is it completely detached from the visual hierarchy
Kevin B
@Keboo
@Miosss good question, i would expect it to match the behavior of the normal WPF Popup control (since PopupBox is just a fancy wrapper of a ToggleButton and a Popup), but I am not sure what that behavior is.
KatoFett
@KatoFett
Hello. How do I change the style of a PopupBox's ToggleButton? I want to apply a certain style to it and have text as opposed to an icon. I've tried tampering with the ToggleContentTemplate property and while it looks correct, I get runtime errors when I click. What's the best way to go about this?
KamilGadawski
@KamilGadawski
I need help. I have this code var service = new ItemMenu ("Service", menuService, PackIconKind.ApplicationSettings); and I need to set the icons. I don't know where to look for the icons defined in PackIconKind class. Unfortunately there are no equivalents from the above mentioned class on the website
Jesper Hansen
@jespersh
@Keboo How are the .props files used? I don't see them imported
oh, it is implicit
Vasilije Bursac
@VasilijeBursac
Hello everyone! Happy New Year, I wish you all the best! Is there any way to limit WPF MaterialDesign TimePicker to only 30 minute intervals. For example, only 7:00, 7:30, 8:00... are possible choices, nothing in between? How to do it? Thanks in advance!
Trần Quảng Dũng
@ctdungqs
Hello
Vasilije Bursac
@VasilijeBursac
Can somebody help me with this please?
I tried to find where in implementation of TimePicker I should redefine it, but there is so many classes....
Kevin B
@Keboo
@KatoFett you can do that by setting the ToggleContent. I have an example of that here
Kevin B
@Keboo
@KamilGadawski there are two easy ways to view the icons in this library. The first is by going to: https://materialdesignicons.com/ the second is within the demo app there is an icons page where you can see all of them.
@jespersh I assume you already found them but there are a couple magical file names that get automatically picked up. https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019
@VasilijeBursac there is an open issue #1035 for that, but nothing there right now
Kevin B
@Keboo
As for the files to modify. XAML templates/style for the TimePicker can be found here. The control itself is here. I suspect you will also want to look at the clock control as well. Its XAML is here and the code behind for it is here
Vasilije Bursac
@VasilijeBursac
@Keboo Thank you very much for your response! I will check these links out and try to make it work!
Federico Rossi
@artipo
Hey @Keboo , I think that that #2170 can be close now that you have merged my pull request (MaterialDesignInXAML/MaterialDesignInXamlToolkit#2192)
Drise13
@Drise13
@Keboo is there a ways to target a DatePickerTextBox and set it to read-only?
same for the time picker
Drise13
@Drise13
I want to be able to only allow a user to use the picking part and not be able to hand edit the date/time
Kevin B
@Keboo
@Drise13 yes but it is not really intuitive. In the templates it uses the DynamicResource to look up the style for the TextBox. This subtlety gives you an injection point to insert your own style. As long as you base your style on the original one it lets you toggle stuff. Something like this:
<DatePicker
    Width="100"
    materialDesign:HintAssist.Hint="Pick Date"
    Style="{StaticResource MaterialDesignFloatingHintDatePicker}">
    <DatePicker.Resources>
        <Style x:Key="MaterialDesignDatePickerTextBox"
                BasedOn="{StaticResource MaterialDesignDatePickerTextBox}"
                TargetType="{x:Type DatePickerTextBox}">
            <Setter Property="Background" Value="Red" />
        </Style>
    </DatePicker.Resources>
</DatePicker>
image.png
jeeshenlee
@jeeshenlee_twitter
Is it just me? The latest Master branch having compilation errors