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

Issues to be addressed in the toolkit #1

Open
2 of 3 tasks
UmaHarano opened this issue Sep 6, 2018 · 0 comments
Open
2 of 3 tasks

Issues to be addressed in the toolkit #1

UmaHarano opened this issue Sep 6, 2018 · 0 comments
Assignees

Comments

@UmaHarano
Copy link
Collaborator

UmaHarano commented Sep 6, 2018

  • The styles used in the XAML should all be public styles. Refer to the Pro Style Guide for the available public styles.

  • The classes for the user controls located inside the Pages folder should reside in this namespace namespace MetadataToolkit.Pages. This is the convention Visual Studio follows.

  • A new Custom page should be added in the DAML. Screenshot of what we want is below along with code syntax.

2018-09-06_9-55-16

DAML:

  <!-- TODO add your custom pages for Overview here -->

                  <page class="$safeprojectname$.CustomPage">
                    <validation>
                    </validation>
                  </page>

Code behind and xaml:

using ....

namespace MetadataToolkitSix
{

    internal class CustomPageLabel : ISidebarLabel
    {
        string ISidebarLabel.SidebarLabel
        {
            get { return CustomPageLabel.SidebarLabel; }
        }

        public static string SidebarLabel
        {
            get { return "Custom Page"; }
        }
    }
    /// <summary>
    /// Interaction logic for CustomPage.xaml
    /// </summary>
    public partial class CustomPage : EditorPage
    {
        public CustomPage()
        {
            InitializeComponent();

        }

        public override string SidebarLabel
        {
            get { return CustomPageLabel.SidebarLabel; }
        }
    }
}
<p:EditorPage x:Class="MetadataToolkitSix.CustomPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:MetadataToolkitSix"
             xmlns:p="clr-namespace:ArcGIS.Desktop.Metadata.Editor.Pages;assembly=ArcGIS.Desktop.Metadata"
             xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <DockPanel LastChildFill="True" Grid.Row="0">
            <TextBlock Text="Custom Field:" Margin="10,0,10,0" Style="{DynamicResource Esri_TextBlockRegular}" 
                       DockPanel.Dock="Left"></TextBlock>
            <TextBox HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="10,0,10,0"></TextBox>

        </DockPanel>
    </Grid>
</p:EditorPage>
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

2 participants