0
votes

I'm developing several user controls, and when I add one of this control to other I have the follow error in the designed tab. But the application can compile.

System.Resources.MissingSatelliteAssemblyException El ensamblado satélite "Microsoft.VisualStudio.DesignTools.SurfaceDesigner.resources.dll, Version=17.0.0.0, PublicKeyToken=b03f5f7f11d5a3a" para la referencia cultural de reserva "en" no se pudo encontrar o cargar. Generalmente, se trata de un problema de configuración. Vuelva a instalar o repare la aplicación. en System.Resources.ManifestBasedResourceGroveler.HandleSatelliteMissing() en System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark) en System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark) en System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) en System.Resources.ResourceManager.GetString(String name, CultureInfo culture) en System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer`1 comparer) en Microsoft.VisualStudio.DesignTools.SurfaceDesigner.DesignerTapStringTable.GetStringTableT en Microsoft.VisualStudio.DesignTools.WpfSurfaceDesigner.Views.WpfSurfaceProcessContext.GetDesignerTapStringTable() en Microsoft.VisualStudio.DesignTools.SurfaceDesigner.Documents.SurfaceIsolation.SurfaceProcessContext.InitializePipeline() en Microsoft.VisualStudio.DesignTools.SurfaceDesigner.Documents.SurfaceIsolation.SurfaceProcessContext.FinishSurfaceProcessCreation(DateTime start, Boolean forcePlatformOnly) en Microsoft.VisualStudio.DesignTools.SurfaceDesigner.Documents.SurfaceIsolation.SurfaceProcessContext.d__105.MoveNext() --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción --- en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) en Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.Views.IsolatedSurfaceImageHost.d__67.MoveNext() System.AggregateException Se han producido uno o varios errores.

The code is:

UserControl x:Class="UserInterfaceAS.UI.GeneralPanelAS"
             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:UserInterfaceAS.UI"
             mc:Ignorable="d" >
    <Grid x:Name="grdMainPanel" Opacity="0.8">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="Black" Offset="0.65"/>
                <GradientStop Color="#FF3C3C54" Offset="0.177"/>
            </LinearGradientBrush>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="25"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Rectangle x:Name="border" HorizontalAlignment="Stretch"   Grid.Row="0" Grid.Column="0"  Margin="0,0,0,0" VerticalAlignment="Stretch" Opacity="0.9">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black"/>
                    <GradientStop Color="#FF696A73" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Label x:Name ="lblTitle"  Content="PANEL TITLE" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" MouseDown="Title_MouseDown" Foreground="White" FontSize="20" Margin="0,-5,0,0" FontWeight="Bold" HorizontalContentAlignment="Center" VerticalContentAlignment="Stretch"  FontFamily="Open Sans" Grid.ColumnSpan="2"/>
        <Label x:Name ="lblRow01" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,-2,0,0" MouseDown="Title_MouseDown">
            <Label.Content>
                <WrapPanel Orientation="Horizontal">
                    <TextBlock x:Name="tbDescription01" Text="TEXT DESCRIPTION 01: "  Foreground="White" FontFamily="Open Sans" FontWeight="Bold" ></TextBlock>
                    <TextBlock x:Name="tbBlanc01" Text="    "  Foreground="White" FontFamily="Open Sans"></TextBlock>
                    <TextBlock x:Name="tbText01"        Text="TEXT 01"              Foreground="White" FontFamily="Open Sans"></TextBlock>
                </WrapPanel>
            </Label.Content>
        </Label>
        <Label x:Name ="lblRow02" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,20,0,0" MouseDown="Title_MouseDown">
            <Label.Content>
                <WrapPanel Orientation="Horizontal">
                    <TextBlock x:Name="tbDescription02" Text="TEXT DESCRIPTION 02: "  Foreground="White" FontFamily="Open Sans" FontWeight="Bold"></TextBlock>
                    <TextBlock x:Name="tbBlanc02" Text="    "  Foreground="White" FontFamily="Open Sans"></TextBlock>
                    <TextBlock x:Name="tbText02"        Text="TEXT 02"              Foreground="White" FontFamily="Open Sans"></TextBlock>
                </WrapPanel>
            </Label.Content>
        </Label>
        <Label x:Name ="lblRow03" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,42,0,0" MouseDown="Title_MouseDown">
            <Label.Content>
                <WrapPanel Orientation="Horizontal">
                    <TextBlock x:Name="tbDescription03" Text="TEXT DESCRIPTION 03: "  Foreground="White" FontFamily="Open Sans" FontWeight="Bold"></TextBlock>
                    <TextBlock x:Name="tbBlanc03" Text="    "  Foreground="White" FontFamily="Open Sans"></TextBlock>
                    <TextBlock x:Name="tbText03"        Text="TEXT 03"              Foreground="White" FontFamily="Open Sans"></TextBlock>
                </WrapPanel>
            </Label.Content>
        </Label>
        <Label x:Name ="lblRow04" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,64,0,0" MouseDown="Title_MouseDown">
            <Label.Content>
                <WrapPanel Orientation="Horizontal">
                    <TextBlock x:Name="tbDescription04" Text="TEXT DESCRIPTION 04: "  Foreground="White" FontFamily="Open Sans" FontWeight="Bold"></TextBlock>
                    <TextBlock x:Name="tbBlanc04" Text="    "  Foreground="White" FontFamily="Open Sans"></TextBlock>
                    <TextBlock x:Name="tbText04"        Text="TEXT 04"              Foreground="White" FontFamily="Open Sans"></TextBlock>
                </WrapPanel>
            </Label.Content>
        </Label>
        <Label x:Name ="lblRow05" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,86,0,0" MouseDown="Title_MouseDown">
            <Label.Content>
                <WrapPanel Orientation="Horizontal">
                    <TextBlock x:Name="tbDescription05" Text="TEXT DESCRIPTION 04: "  Foreground="White" FontFamily="Open Sans" FontWeight="Bold"></TextBlock>
                    <TextBlock x:Name="tbBlanc05" Text="    "  Foreground="White" FontFamily="Open Sans"></TextBlock>
                    <TextBlock x:Name="tbText05"        Text="TEXT 04"              Foreground="White" FontFamily="Open Sans"></TextBlock>
                </WrapPanel>
            </Label.Content>
        </Label>
        <Label x:Name ="lblRow06" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,108,0,0" MouseDown="Title_MouseDown">
            <Label.Content>
                <WrapPanel Orientation="Horizontal">
                    <TextBlock x:Name="tbDescription06" Text="TEXT DESCRIPTION 04: "  Foreground="White" FontFamily="Open Sans" FontWeight="Bold"></TextBlock>
                    <TextBlock x:Name="tbBlanc06" Text="    "  Foreground="White" FontFamily="Open Sans"></TextBlock>
                    <TextBlock x:Name="tbText06"        Text="TEXT 04"              Foreground="White" FontFamily="Open Sans"></TextBlock>
                </WrapPanel>
            </Label.Content>
        </Label>
    </Grid>
</UserControl>


    using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using CoreAS.Lib;
using NLog;


namespace UserInterfaceAS.UI
{
    /// <summary>
    /// Lógica de interacción para GeneralPanelAS.xaml
    /// </summary>
    public partial class GeneralPanelAS : UserControl
    {
        private ToolsAS toolsAS = new ToolsAS();
        private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
        public GeneralPanelAS()
        {
            
            SetLanguage();
            InitializeComponent();
            

            this.tbText01.Text = "";
            this.tbText02.Text = "";
            this.tbText03.Text = "";
            this.tbText04.Text = "";
            this.tbText05.Text = "";
            this.tbText06.Text = "";

            
            this.lblTitle.SetResourceReference(Label.ContentProperty, "");
            this.lblTitle.SetResourceReference(Label.TagProperty, "");

            this.tbDescription01.SetResourceReference(TextBlock.TextProperty, "");
            this.tbDescription01.SetResourceReference(TextBlock.TagProperty, "");

            this.tbDescription02.SetResourceReference(TextBlock.TextProperty, "");
            this.tbDescription02.SetResourceReference(TextBlock.TagProperty, "");

            this.tbDescription03.SetResourceReference(TextBlock.TextProperty, "");
            this.tbDescription03.SetResourceReference(TextBlock.TagProperty, "");

            this.tbDescription04.SetResourceReference(TextBlock.TextProperty, "");
            this.tbDescription04.SetResourceReference(TextBlock.TagProperty, "");

            this.tbDescription05.SetResourceReference(TextBlock.TextProperty, "");
            this.tbDescription05.SetResourceReference(TextBlock.TagProperty, "");

            this.tbDescription06.SetResourceReference(TextBlock.TextProperty, "");
            this.tbDescription06.SetResourceReference(TextBlock.TagProperty, "");
        }

        public string Title { set { lblTitle.SetResourceReference(Label.ContentProperty, value); } }
        
        public string SetDescriptionLine01 { set { tbDescription01.SetResourceReference(TextBlock.TextProperty, value); } }
        public string SetDescriptionLine02 { set { tbDescription02.SetResourceReference(TextBlock.TextProperty, value); } }
        public string SetDescriptionLine03 { set { tbDescription03.SetResourceReference(TextBlock.TextProperty, value); } }
        public string SetDescriptionLine04 { set { tbDescription04.SetResourceReference(TextBlock.TextProperty, value); } }
        public string SetDescriptionLine05 { set { tbDescription05.SetResourceReference(TextBlock.TextProperty, value); } }
        public string SetDescriptionLine06 { set { tbDescription06.SetResourceReference(TextBlock.TextProperty, value); } }
               
        public string SetTagLine01 { set { tbDescription01.SetResourceReference(TextBlock.TagProperty, value); } }
        public string SetTagLine02 { set { tbDescription02.SetResourceReference(TextBlock.TagProperty, value); } }
        public string SetTagLine03 { set { tbDescription03.SetResourceReference(TextBlock.TagProperty, value); } }
        public string SetTagLine04 { set { tbDescription04.SetResourceReference(TextBlock.TagProperty, value); } }
        public string SetTagLine05 { set { tbDescription05.SetResourceReference(TextBlock.TagProperty, value); } }
        public string SetTagLine06 { set { tbDescription06.SetResourceReference(TextBlock.TagProperty, value); } }
        
        public string TextLine01 { get { return tbText01.Text.Trim(); } set { tbText01.Text = value; } }
        public string TextLine02 { get { return tbText02.Text.Trim(); } set { tbText02.Text = value; } }
        public string TextLine03 { get { return tbText03.Text.Trim(); } set { tbText03.Text = value; } }
        public string TextLine04 { get { return tbText04.Text.Trim(); } set { tbText04.Text = value; } }
        public string TextLine05 { get { return tbText05.Text.Trim(); } set { tbText05.Text = value; } }
        public string TextLine06 { get { return tbText06.Text.Trim(); } set { tbText06.Text = value; } }

        public void SetLanguage()
        {
            this.Resources.MergedDictionaries.Add(toolsAS.SetLanguageDictionary());
        }
        public void SetFontSize(int _size)
        {
            try
            {
                foreach (var item in grdMainPanel.Children)
                {
                    if (item.GetType().Name.ToUpper() == "TEXTBLOCK")
                    {
                        TextBlock tmp = (TextBlock)item;
                        tmp.FontSize = _size;
                    }
                    if (item.GetType().Name.ToUpper() == "LABEL")
                    {
                        Label tmp = (Label)item;
                        tmp.FontSize = _size;
                    }
                }
            }
            catch (InvalidCastException ex)
            {
                Logger.Error("SetFontSize" + ex.Message);
                throw new InvalidCastException("SetFonSize", ex);
            }
        }
        public  void SetFontType(string fonttype)
        {
            foreach (var item in grdMainPanel.Children )
            {
                
            }
        }
        private void Title_MouseDown(object sender, MouseButtonEventArgs e)
        {

            if (e.ClickCount == 2)
            {
                Clipboard.Clear();
                if (e.Source.GetType().Name.ToUpper() == "TEXTBLOCK")
                {
                    TextBlock tmp = (TextBlock)e.Source;
                    if (tmp.Name.Trim().Contains("01"))
                        Clipboard.SetText(tbDescription01.Text + tbText01.Text);
                    if (tmp.Name.Trim().Contains("02"))
                        Clipboard.SetText(tbDescription02.Text + tbText02.Text);
                    if (tmp.Name.Trim().Contains("03"))
                        Clipboard.SetText(tbDescription03.Text + tbText03.Text);
                    if (tmp.Name.Trim().Contains("04"))
                        Clipboard.SetText(tbDescription04.Text + tbText04.Text);
                    if (tmp.Name.Trim().Contains("05"))
                        Clipboard.SetText(tbDescription05.Text + tbText05.Text);
                    if (tmp.Name.Trim().Contains("06"))
                        Clipboard.SetText(tbDescription06.Text + tbText06.Text);
                }
                if (e.Source.GetType().Name.ToUpper() == "LABEL")
                {
                    string _toclipboar = "";
                    _toclipboar = tbDescription01.Text + tbText01.Text + "\n";
                    _toclipboar += tbDescription02.Text + tbText02.Text + "\n";
                    _toclipboar += tbDescription03.Text + tbText03.Text + "\n";
                    _toclipboar += tbDescription04.Text + tbText04.Text + "\n";
                    _toclipboar += tbDescription05.Text + tbText05.Text + "\n";
                    _toclipboar += tbDescription06.Text + tbText06.Text + "\n";

                    Clipboard.SetText(_toclipboar);

                }
            }
        }
    }
}

enter image description here