Skip to main content
edited tags
Link
EldHasp
  • 8.6k
  • 2
  • 11
  • 33
added 8 characters in body
Source Link
marc_s
  • 759.8k
  • 186
  • 1.4k
  • 1.5k

I have a mauiMAUI app. theThe initial XAMAL codeXAML markup looks like this:

<mops:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                xmlns:mops="clr-namespace:Mopups.Pages;assembly=Mopups"
                xmlns:tools="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
                xmlns:vmods="clr-namespace:LockAndKey.Pages"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:DataType="vmods:DbViewModel"
                x:Class="LockAndKey.Pages.DbUpdte"
                CloseWhenBackgroundIsClicked="False"
                BackgroundColor="#80000000">
<mops:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                xmlns:mops="clr-namespace:Mopups.Pages;assembly=Mopups"
                xmlns:tools="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
                xmlns:vmods="clr-namespace:LockAndKey.Pages"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:DataType="vmods:DbViewModel"
                x:Class="LockAndKey.Pages.DbUpdte"
                CloseWhenBackgroundIsClicked="False"
                BackgroundColor="#80000000">

As you can see I'm using Community Toolkit mauifor MAUI. What I'm trying to do is mask an entry control like a telephone number entry. So I have the XAML entry control like this:

<Entry Placeholder="Enter owner's phone number"
       Grid.Row="2" Margin="20,0,10,0"
       Text="{Binding DbPhone}" Keyboard="Numeric">
    <Entry.Behaviors>
        <tools:MaskedBehavior Mask="(000) 000-0000"/>
    </Entry.Behaviors>
</Entry>
<Entry Placeholder="Enter owner's phone number"
       Grid.Row="2" Margin="20,0,10,0"
       Text="{Binding DbPhone}" Keyboard="Numeric">
    <Entry.Behaviors>
        <tools:MaskedBehavior Mask="(000) 000-0000"/>
    </Entry.Behaviors>
</Entry>

TheAnd this is the data binding for the control is this:

And whenWhen I run the program and tab town to this entry control, no numeric keypad shows up, and when I enter a phone number, nothing is entered into the control. How can I fix this?

I have a maui app. the initial XAMAL code looks like this:

<mops:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                xmlns:mops="clr-namespace:Mopups.Pages;assembly=Mopups"
                xmlns:tools="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
                xmlns:vmods="clr-namespace:LockAndKey.Pages"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:DataType="vmods:DbViewModel"
                x:Class="LockAndKey.Pages.DbUpdte"
                CloseWhenBackgroundIsClicked="False"
                BackgroundColor="#80000000">

As you can see I'm using Community Toolkit maui. What I'm trying to do is mask an entry control like a telephone number entry. So I have the XAML entry control like this:

<Entry Placeholder="Enter owner's phone number"
       Grid.Row="2" Margin="20,0,10,0"
       Text="{Binding DbPhone}" Keyboard="Numeric">
    <Entry.Behaviors>
        <tools:MaskedBehavior Mask="(000) 000-0000"/>
    </Entry.Behaviors>
</Entry>

The data binding for the control is this:

And when I run the program and tab town to this entry control, no numeric keypad shows up and when I enter a phone number, nothing is entered into the control. How can I fix this?

I have a MAUI app. The initial XAML markup looks like this:

<mops:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                xmlns:mops="clr-namespace:Mopups.Pages;assembly=Mopups"
                xmlns:tools="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
                xmlns:vmods="clr-namespace:LockAndKey.Pages"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:DataType="vmods:DbViewModel"
                x:Class="LockAndKey.Pages.DbUpdte"
                CloseWhenBackgroundIsClicked="False"
                BackgroundColor="#80000000">

As you can see I'm using Community Toolkit for MAUI. What I'm trying to do is mask an entry control like a telephone number entry. So I have the XAML entry control like this:

<Entry Placeholder="Enter owner's phone number"
       Grid.Row="2" Margin="20,0,10,0"
       Text="{Binding DbPhone}" Keyboard="Numeric">
    <Entry.Behaviors>
        <tools:MaskedBehavior Mask="(000) 000-0000"/>
    </Entry.Behaviors>
</Entry>

And this is the data binding for the control:

When I run the program and tab town to this entry control, no numeric keypad shows up, and when I enter a phone number, nothing is entered into the control. How can I fix this?

deleted 68 characters in body
Source Link
wohlstad
  • 35.8k
  • 18
  • 78
  • 111

I have a maui app. the initial XAMAL code looks like this:

<mops:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                xmlns:mops="clr-namespace:Mopups.Pages;assembly=Mopups"
                xmlns:tools="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
                xmlns:vmods="clr-namespace:LockAndKey.Pages"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:DataType="vmods:DbViewModel"
                x:Class="LockAndKey.Pages.DbUpdte"
                CloseWhenBackgroundIsClicked="False"
                BackgroundColor="#80000000">

As you can see I'm using Community Toolkit maui. What I'm trying to do is mask an entry control like a telephone number entry. So I have the XAML entry control like this:

        <Entry Placeholder="Enter owner's phone number"
               Grid.Row="2" Margin="20,0,10,0"
               Text="{Binding DbPhone}" Keyboard="Numeric">
            <Entry.Behaviors>
                <tools:MaskedBehavior Mask="(000) 000-0000"/>
            </Entry.Behaviors>
        </Entry>

The data binding for the control is this:

    public string DbPhone
    {
        get => _phone;
        set
        {
            _phone = value;
            OnPropertyChanged(nameof(DbPhone));
        }
    }
public string DbPhone
{
    get => _phone;
    set
    {
        _phone = value;
        OnPropertyChanged(nameof(DbPhone));
    }
}

And when I run the program and tab town to this entry control, no numeric keypad shows up and when I enter a phone number, nothing is entered into the control. How can I fix this?

I have a maui app. the initial XAMAL code looks like this:

<mops:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                xmlns:mops="clr-namespace:Mopups.Pages;assembly=Mopups"
                xmlns:tools="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
                xmlns:vmods="clr-namespace:LockAndKey.Pages"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:DataType="vmods:DbViewModel"
                x:Class="LockAndKey.Pages.DbUpdte"
                CloseWhenBackgroundIsClicked="False"
                BackgroundColor="#80000000">

As you can see I'm using Community Toolkit maui. What I'm trying to do is mask an entry control like a telephone number entry. So I have the XAML entry control like this:

        <Entry Placeholder="Enter owner's phone number"
               Grid.Row="2" Margin="20,0,10,0"
               Text="{Binding DbPhone}" Keyboard="Numeric">
            <Entry.Behaviors>
                <tools:MaskedBehavior Mask="(000) 000-0000"/>
            </Entry.Behaviors>
        </Entry>

The data binding for the control is this:

    public string DbPhone
    {
        get => _phone;
        set
        {
            _phone = value;
            OnPropertyChanged(nameof(DbPhone));
        }
    }

And when I run the program and tab town to this entry control, no numeric keypad shows up and when I enter a phone number, nothing is entered into the control. How can I fix this?

I have a maui app. the initial XAMAL code looks like this:

<mops:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                xmlns:mops="clr-namespace:Mopups.Pages;assembly=Mopups"
                xmlns:tools="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
                xmlns:vmods="clr-namespace:LockAndKey.Pages"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:DataType="vmods:DbViewModel"
                x:Class="LockAndKey.Pages.DbUpdte"
                CloseWhenBackgroundIsClicked="False"
                BackgroundColor="#80000000">

As you can see I'm using Community Toolkit maui. What I'm trying to do is mask an entry control like a telephone number entry. So I have the XAML entry control like this:

<Entry Placeholder="Enter owner's phone number"
       Grid.Row="2" Margin="20,0,10,0"
       Text="{Binding DbPhone}" Keyboard="Numeric">
    <Entry.Behaviors>
        <tools:MaskedBehavior Mask="(000) 000-0000"/>
    </Entry.Behaviors>
</Entry>

The data binding for the control is this:

public string DbPhone
{
    get => _phone;
    set
    {
        _phone = value;
        OnPropertyChanged(nameof(DbPhone));
    }
}

And when I run the program and tab town to this entry control, no numeric keypad shows up and when I enter a phone number, nothing is entered into the control. How can I fix this?

Source Link
Bob Gatto
  • 166
  • 1
  • 10
Loading