Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 18:11
    dnfadmin commented #4290
  • 16:02
    anhhaokms labeled #4302
  • 16:02
    anhhaokms opened #4302
  • 02:38
    dnfadmin commented #4247
  • 02:29
    dnfadmin commented #4076
  • May 24 09:31
    dnfadmin commented #4301
  • May 24 09:15
    dnfadmin commented #4301
  • May 24 09:11
    MarcelWilke42 closed #4301
  • May 24 09:04
    Build #1828 passed
  • May 24 08:57
    dnfadmin commented #4301
  • May 24 08:56
    dnfadmin commented #4301
  • May 24 08:56
    MarcelWilke42 opened #4301
  • May 23 11:13
    dnfadmin commented #4007
  • May 22 15:13
    dnfadmin commented #4025
  • May 20 20:55
    Build #1827 passed
  • May 20 20:48
    punker76 commented #4247
  • May 20 20:47

    punker76 on develop

    Update MessageDialog.cs Fix De… Merge pull request #4247 from c… (compare)

  • May 20 20:47
    punker76 closed #4247
  • May 20 20:47
    punker76 edited #4247
  • May 20 20:46
    punker76 milestoned #4247
seba30
@seba30
image.png
image.png
Jan Karger ツ ☀
@punker76

@seba30 Thx for the code. I can see that you use a FlipViewItem inside a FlipViewItem ;-) because the FlipViewItem is automatically generated by WPF itself, so you don't need to use a second one.
So my suggestion and maybe the easiest way is to use a Binding to the BannerText of the FlipView and the SelectedItem like

BannerText="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.Title, FallbackValue={x:Null}}"

and then using this ItemTemplate

<mah:FlipView.ItemTemplate>
    <DataTemplate DataType="interfaces:IPage">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="30" />
            </Grid.RowDefinitions>

            <ContentControl Grid.Row="0" cm:View.Model="{Binding}" />
        </Grid>
    </DataTemplate>
</mah:FlipView.ItemTemplate>
seba30
@seba30
You are awesome! Didn't know, that the FlipViewItem is generated automatically. Works like a charme.
Jan Karger ツ ☀
@punker76
@seba30 :thumbsup:
seba30
@seba30
:beers:
seba30
@seba30
Was on my way to find the place where the magic happens. :-D
"GetContainerForItemOverride" this was already in my clipboard to search.
seba30
@seba30
image.png
Next issue: I want to re-create the NavigationButtonTemplate and increase the size a lot. This works, but the Buttons are cutted.
image.png
This
image.png
leads to this
image.png
Baominh Michel
@bao86:matrix.org
[m]
Hello Anyone knows how to use IDataErrorInfo with Powershell ?
1 reply
seba30
@seba30
Why are my flyouts not themed if I use my own color resource file?
With MahApps built-in color:
image.png
With my color:
image.png
And yes, I compared both files (they're including the same resources).
seba30
@seba30
Hmm ... Adding the theme via ThemeManager.Current.AddLibraryTheme and ThemeManager.Current.ChangeTheme works.
seba30
@seba30
Nah ... Not all colors are known (for example: MahApps.Brushes.Accent4).
Jan Karger ツ ☀
@punker76
@seba30 Can you post the resource file (you can post it in a private chat, if it's needed)
seba30
@seba30
4 replies
seba30
@seba30
@punker76 Maybe I should have mentioned you.
Howard Alt
@howardalt
I'm looking to swap out the WindowChrome for a MetroWindow. I'm not trying to do anything too complicated, and it works "fine" with a standard Window, but the docs are a little light on this topic. Suggestions?
2 replies
seba30
@seba30
I want to show a Flyout OVER an open BaseMetroDialog. How is this possible? I can see with Snoop, that the Flyout opens but the ZIndex is too low. If I edit the ZIndex to greater than 10, the Flyout is the topmost.
3 replies
image.png
NickHarmer
@NickHarmer
image.png

Does anyone know if it's possible to change the underlying XAML definition of BaseMetroDialog?

I have a custom style for dialog boxes, but I need to change the highlighted line below - since it's in BaseMetroDialog.xaml, I'm not sure how to go about it:

Jan Karger ツ ☀
@punker76
@NickHarmer In the current source of the upcoming v3 you can change this easier than in v2.
1 reply
Alex
@AlexanderGipp
An input dialog returns a string, can I somehow make my CustomDialog return an int?
Jan Karger ツ ☀
@punker76
@AlexanderGipp Yes, that’s possible.
Alex
@AlexanderGipp
How can I do that @punker76 ?
JustinChanDelve
@JustinChanDelve
Question: Is there a way to differentiate between a user touch and programmatically toggling the ToggleSwitch? I'm running into an issue where a function is running twice because I turn it on, and then try to set the initial state of the toggleswitch, which then triggers that function again.
Tim
@timunie
Sounds not like a good UX
But you can for example just use OneWay Binding
Or OneTime binding and handle the logic in code behind
Alex
@AlexanderGipp
Does anyone know why I get this error:
System.InvalidOperationException: 'Context is not registered. Consider using DialogParticipation.Register in XAML to bind in the DataContext.'
 _dialogCoordinator.HideMetroDialogAsync(Application.Current.MainWindow as MetroWindow, Dialog);
<mah:MetroWindow
 mah:DialogParticipation.Register="{Binding}"
...
Alex
@AlexanderGipp
This works though:
var test = Application.Current.MainWindow as MetroWindow;
test.HideMetroDialogAsync(Dialog);
Bao
@Baominh86_twitter
Hello everyone,
I'm using MahApps with Powershell and I'm trying to use IDataErrorInfo and INotifyPropertyChanged but no luck :(
Someone can help me to debug ?
Bao
@Baominh86_twitter

Powershell script :
$code = @"
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Runtime.CompilerServices;
using System.IO;
using System.Reflection;
using System.Linq;

public class EmployeeInfo : IDataErrorInfo, INotifyPropertyChanged
{
private int _EmployeeID;
private string _Name;
private string _Title;

public event PropertyChangedEventHandler PropertyChanged;

public EmployeeInfo()
{

}

public int EmployeeID
{
    get { return this._EmployeeID; }
    set
    {
        this._EmployeeID = value;
        this.RaisePropertyChanged("EmployeeID");        
    }
}
public string Name
{
    get { return this._Name; }
    set
    {
        this._Name = value;
        this.RaisePropertyChanged("Name");
    }
}

public string Title
{
    get { return this._Title; }
    set
    {
        this._Title = value;
        this.RaisePropertyChanged("Title");
    }
}

public string Error
{
    get { return string.Empty; }
}

public string this[string columnName]
{
    get
    {   
        if (!columnName.Equals("Title"))
            return string.Empty;
        if (this.Title.Contains("Marketing"))
            return "Marketing is not allowed";
        return "string.Empty";
    }
}

private void RaisePropertyChanged(string propertyName)
{
    if (PropertyChanged != null)
        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}

}
"@

Add-Type -TypeDefinition $code -Language CSharp

Define Title

$TextboxTitle.DataContext = [PSCustomObject]@{
Title= "Marketing"
}

$Validation = [EmployeeInfo]::New()
$TextboxTitle.Add_TextChanged({
$Validation.Title = $SumRelease.Text
$Validation["Title"]
})

XAML File :

<TextBox x:Name="TextboxTitle" Grid.Row="0" Grid.Column="3" IsEnabled="True" Width="300" mah:TextBoxHelper.Watermark="Please enter the Release version." Text="{Binding Title, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True}" />

Bao
@Baominh86_twitter

If I don't define the Datacontext
$TextboxTitle.DataContext = [PSCustomObject]@{

    #Title= "Marketing"   ==> Don't define

}
I get this :
image.png

Bao
@Baominh86_twitter

then i get this if it's define.
image.png

I don't know how to do, needing your expertise :) and sorry for my english language

Denis Zaporozhets
@QuantumDeveloper
Hi. Does anyone know how to implement intellisense for VisualStudio/Rider for custom file type?