Skip to content
Snippets Groups Projects
Select Git revision
  • c3b3b3f031da7c77ebd9ef8d5b9c6e885603e7e8
  • main default protected
2 results

label_2.5.1.xml

Blame
  • label_2.5.1.xml 16.86 KiB
    <widget xmlns="http://openajax.org/metadata" spec="1.0" id="http://microsoft.com/appmagic/label" name="label" jsClass="AppMagic.Controls.Label" version="2.5.1" styleable="true" runtimeCost="1" xmlns:appMagic="http://schemas.microsoft.com/appMagic">
      <author name="Microsoft AppMagic" />
      <license type="text/html"><![CDATA[<p>TODO:  Need license text here.</p>]]></license>
      <description><![CDATA[LABEL
          Control description here.]]></description>
      <requires>
        <require type="css" src="css/label.css" />
        <require type="javascript" src="js/label.js" excludeOnFeatureGate="controls.reactLabel" />
        <require type="javascript" src="js/labelReactProxy.js" includeOnFeatureGate="controls.reactLabel" />
      </requires>
      <appMagic:capabilities contextualViewsEnabled="true" allowsPerCharacterFormatting="true" autoBorders="true" autoFill="true" autoFocusedBorders="true" autoPointerViewState="true" autoDisabledViewState="true" screenActiveAware="true" isVersionFlexible="true" supportsSetFocus="true" />
      <content><![CDATA[
      <div
        class="appmagic-label no-focus-outline"
        touch-action="pan-x pan-y"
        tabIndex="-1"
        data-bind="
          style: {
            fontFamily: properties.Font,
            fontSize: properties.Size,
            color: autoProperties.Color,
            fontWeight: properties.FontWeight,
            fontStyle: properties.Italic,
            textAlign: properties.Align,
            paddingTop: properties.PaddingTop,
            paddingRight: properties.PaddingRight,
            paddingBottom: properties.PaddingBottom,
            paddingLeft: properties.PaddingLeft,
            lineHeight: properties.LineHeight,
            overflowY: properties.Overflow,
            display:  properties.Overflow() === 'auto' ? 'block' : ''
          },
          css: {
            top: properties.AutoHeight() || properties.VerticalAlign() === 'top',
            middle: !properties.AutoHeight() && properties.VerticalAlign() === 'middle',
            bottom: !properties.AutoHeight() && properties.VerticalAlign() === 'bottom',
            disabled: viewState.displayMode() === AppMagic.Constants.DisplayMode.Disabled,
            readOnly: viewState.displayMode() === AppMagic.Constants.DisplayMode.View,
            underline: properties.Underline,
            strikethrough: properties.Strikethrough
          },
          attr: {
            title: properties.Tooltip,
            role: properties.TabIndex() >= 0 ? 'button' : 'presentation',
            'aria-disabled': properties.TabIndex() >= 0 && viewState.displayMode() !== AppMagic.Constants.DisplayMode.Edit
          },
          event: {
            click: handleClick
          },
          shortcut: {
            provider: shortcutProvider,
            enabled: shortcutsEnabled
          }"
        >
        <!-- ko if: properties.Role() !== 'heading1' && properties.Role() !== 'heading2' && properties.Role() !== 'heading3' && properties.Role() !== 'heading4' -->
            <div
              spellcheck="false"
              unselectable="off"
              class="appmagic-label-text"
              data-control-part="text"
              data-bind="{
                inlineEditText: properties.Text,
                css: {
                  'appmagic-label-single-line': !properties.Wrap()
                },
                attr: {
                  'aria-live': live,
                  'aria-atomic': live() ? 'true' : null
                }
              }">