Example #1
0
 public BaseMatFileUpload()
 {
     ClassMapper
     .Add("mat-file-upload")
     .Add("mdc-ripple-surface");
     jsHelper = new MatDotNetObjectReference <BaseMatFileUpload>(this, false);
 }
        public async Task InitAsync(IJSRuntime js, ElementReference @ref, bool enabled)
        {
            Enabled = enabled;
            if (this.Enabled)
            {
                jsHelper =
                    new MatDotNetObjectReference <MatVirtualScrollHelper>(this, false);
                var scrollView = await js.InvokeAsync <MatVirtualScrollView>("matBlazor.matVirtualScroll.init", @ref,
                                                                             jsHelper.Reference);

                this.VirtualScrollingSetView(scrollView);
            }
        }
Example #3
0
        public BaseMatVirtualScroll()
        {
            ClassMapper.Add("mat-virtual-scroll");

            CallAfterRender(async() =>
            {
                if (!Disabled)
                {
                    JsHelperReference =
                        new MatDotNetObjectReference <MatVirtualScrollJsHelper>(new MatVirtualScrollJsHelper(this));
                    var scrollView = await Js.InvokeAsync <MatVirtualScrollView>("matBlazor.matVirtualScroll.init", Ref,
                                                                                 JsHelperReference.Reference);
                    this.SetScrollView(scrollView);
                }
            });
        }
Example #4
0
        public BaseMatSlider()
        {
            jsHelper = new MatDotNetObjectReference <MatSliderJsHelper>(new MatSliderJsHelper());
            jsHelper.Value.OnChangeEvent += Value_OnChangeEvent;
            ValueMin = SwitchT.Minimum;
            ValueMax = SwitchT.Maximum;
            Step     = SwitchT.Step;

            ClassMapper
            .Add("mat-slider")
            .Add("mdc-slider")
            .If("mdc-slider--discrete", () => Discrete);

            CallAfterRender(async() =>
            {
                await JsInvokeAsync <object>("matBlazor.matSlider.init", Ref, jsHelper.Reference);
            });
        }